import type { STT as STTBase } from '../agents/providers.js'; /** Options for {@link STT.deepgram} (Deepgram). */ export type STTDeepgramOptions = { /** Provider identifier; normally left unset. */ provider?: string | null; /** API key for the provider. */ apiKey?: string | null; /** Model name. Defaults to `"nova-2"`. */ modelId?: string | null; /** Recognition language (BCP-47, e.g. `"en-US"`). Defaults to `"en-US"`. */ language?: string | null; /** Input audio sample rate in Hz. Defaults to 48000. */ sampleRate?: number | null; /** Silence duration in ms used to detect speech endpoints. */ endpointing?: number | null; /** Emit interim (non-final) transcripts. Defaults to true. */ interimResults?: boolean | null; /** Add punctuation to transcripts. Defaults to true. */ punctuate?: boolean | null; /** Apply smart formatting (dates, numbers, etc.). Defaults to true. */ smartFormat?: boolean | null; /** Include filler words (um, uh) in transcripts. */ fillerWords?: boolean | null; /** Keywords to boost during recognition. */ keywords?: string[] | null; /** Key terms to bias recognition toward. */ keyterm?: string[] | null; /** Override the inference endpoint base URL. */ baseUrl?: string | null; }; /** Options for {@link STT.google} (Google). */ export type STTGoogleOptions = { /** Provider identifier; normally left unset. */ provider?: string | null; /** API key for the provider. */ apiKey?: string | null; /** Model name. Defaults to `"chirp_3"`. */ modelId?: string | null; /** One or more recognition languages. Defaults to `[language]`. */ languages?: string | string[] | null; /** Single recognition language (BCP-47). Defaults to `"en-US"`. */ language?: string | null; /** Provider region/location. Defaults to `"asia-south1"`. */ location?: string | null; /** Input audio sample rate in Hz. Defaults to 48000. */ sampleRate?: number | null; /** Add punctuation to transcripts. Defaults to true. */ punctuate?: boolean | null; /** Mask profanity in transcripts. */ profanityFilter?: boolean | null; /** Override the inference endpoint base URL. */ baseUrl?: string | null; }; /** Options for {@link STT.sarvam} (Sarvam AI). */ export type STTSarvamOptions = { /** Provider identifier; normally left unset. */ provider?: string | null; /** API key for the provider. */ apiKey?: string | null; /** Model name. Defaults to `"saaras:v3"`. */ modelId?: string | null; /** Recognition language (BCP-47). Defaults to `"en-IN"`. */ language?: string | null; /** Override the inference endpoint base URL. */ baseUrl?: string | null; }; /** Options for {@link STT.assemblyai} (AssemblyAI). */ export type STTAssemblyAIOptions = { /** Provider identifier; normally left unset. */ provider?: string | null; /** API key for the provider. */ apiKey?: string | null; /** Provider region. Defaults to `"US"`. */ region?: string | null; /** Input audio sample rate in Hz. Defaults to 48000. */ inputSampleRate?: number | null; /** Sample rate in Hz the audio is resampled to before transcription. Defaults to 16000. */ targetSampleRate?: number | null; /** Format finalized turns (punctuation/casing). Defaults to true. */ formatTurns?: boolean | null; /** Key terms to bias recognition toward. Defaults to none. */ keytermsPrompt?: string[] | null; /** Confidence threshold for detecting the end of a turn, in `[0, 1]`. Defaults to 0.5. */ endOfTurnConfidenceThreshold?: number | null; /** Minimum trailing silence in ms to end a turn when confidence is high. Defaults to 800. */ minEndOfTurnSilenceWhenConfident?: number | null; /** Maximum silence in ms before a turn is forcibly ended. Defaults to 2000. */ maxTurnSilence?: number | null; /** Speech model to use. Defaults to `"universal-streaming-english"`. */ speechModel?: string | null; /** Enable automatic language detection. Defaults to true. */ languageDetection?: boolean | null; /** Additional inference configuration merged last, overriding individual fields. */ config?: Record | null; /** Override the inference endpoint base URL. */ baseUrl?: string | null; }; /** Options for {@link STT.cartesia} (Cartesia). */ export type STTCartesiaOptions = { /** Provider identifier; normally left unset. */ provider?: string | null; /** API key for the provider. */ apiKey?: string | null; /** Model name. Defaults to `"ink-2"`. */ modelId?: string | null; /** Recognition language. Defaults to `"en"`. */ language?: string | null; /** Input audio sample rate in Hz. Defaults to 48000. */ sampleRate?: number | null; /** Override the inference endpoint base URL. */ baseUrl?: string | null; }; /** Factory for speech-to-text components used by the direct inference API. */ export declare class STT { /** Build a Deepgram speech-to-text component. Defaults: model `"nova-2"`, language `"en-US"`, sample rate 48000 Hz. */ static deepgram(opts?: STTDeepgramOptions): STTBase; /** Build a Google speech-to-text component. Defaults: model `"chirp_3"`, language `"en-US"`, location `"us-central1"`, sample rate 48000 Hz. */ static google(opts?: STTGoogleOptions): STTBase; /** Build a Sarvam AI speech-to-text component. Defaults: model `"saaras:v3"`, language `"en-IN"`, sample rate 48000 Hz. */ static sarvam(opts?: STTSarvamOptions): STTBase; /** Build a Cartesia speech-to-text component. Defaults: model `"ink-2"`, language `"en"`, sample rate 48000 Hz. */ static cartesia(opts?: STTCartesiaOptions): STTBase; /** Build an AssemblyAI speech-to-text component. Defaults: model `"universal-streaming-english"`, language `"en-US"`, region `"US"`, input sample rate 48000 Hz, target sample rate 16000 Hz, format turns on, end-of-turn confidence 0.5, min end-of-turn silence 800 ms, max turn silence 2000 ms, language detection on. */ static assemblyai(opts?: STTAssemblyAIOptions): STTBase; }