import { STT } from '../../agents/providers.js'; import type { AssemblyAISTTModel } from './models.js'; /** Configuration options for the {@link AssemblyAISTT} provider. */ export type AssemblyAISTTOptions = { /** AssemblyAI API key. Falls back to the `ASSEMBLYAI_API_KEY` env var, then `null`. */ apiKey?: string | null; /** Transcription language code. Default: `'en-US'`. */ language?: string; /** Input audio sample rate in Hz. Default: `48000`. */ inputSampleRate?: number; /** Target output sample rate in Hz (alias of `outputSampleRate`). Default: `16000`. */ targetSampleRate?: number; /** Output audio sample rate in Hz. Default: `16000`. */ outputSampleRate?: number; /** Audio encoding. Default: `'pcm_s16le'`. */ encoding?: string; /** Whether to apply turn formatting (punctuation/casing). Default: `true`. */ formatTurns?: boolean; /** Keyterms to bias recognition toward. Default: `null`. */ keytermsPrompt?: string[] | null; /** Confidence threshold for declaring end of turn. Range `0`-`1`. Default: `0.4`. */ endOfTurnConfidenceThreshold?: number; /** Minimum silence (ms) before end of turn when confidence is high. Default: `560`. */ minEndOfTurnSilenceWhenConfident?: number; /** Maximum silence (ms) allowed within a turn. Default: `2400`. */ maxTurnSilence?: number; /** Speech model to use. Default: `'universal-streaming-english'`. */ speechModel?: AssemblyAISTTModel | string; /** Enable automatic language detection. Default: `false`. */ languageDetection?: boolean; /** Override the provider base URL. Default: `null`. */ baseUrl?: string | null; /** Service region. Default: `'US'`. */ region?: string; }; declare class AssemblyAISTTImpl extends STT { static readonly displayName = "AssemblyAISTT"; _providerName: string; apiKey: string | null; model: string; language: string; sampleRate: number; inputSampleRate: number; outputSampleRate: number; encoding: string; formatTurns: boolean; endOfTurnConfidenceThreshold: number; minEndOfTurnSilenceWhenConfident: number; maxTurnSilence: number; keytermsPrompt: string[] | null; languageDetection: boolean; baseUrl: string | null; region: string; constructor(opts?: AssemblyAISTTOptions); getRuntimeConfig(): Record; } export type AssemblyAISTT = AssemblyAISTTImpl; /** * AssemblyAI speech-to-text provider. * * Creates a configured AssemblyAI streaming STT provider for use in a voice agent. */ export declare const AssemblyAISTT: (opts?: AssemblyAISTTOptions) => AssemblyAISTT; export {};