import { STT } from '../../agents/providers.js'; import type { DeepgramSTTModel } from './models.js'; /** * Configuration options for the Deepgram speech-to-text (STT) provider. * * All fields are optional; unspecified values fall back to the defaults * documented below. */ export type DeepgramSTTOptions = { /** * Deepgram API key. Falls back to the `DEEPGRAM_API_KEY` environment * variable, then `null` if neither is set. */ apiKey?: string | null; /** * Deepgram recognition model (e.g. `'nova-2'`, `'nova-3'`, `'enhanced'`). * @default 'nova-2' */ model?: DeepgramSTTModel | string; /** * BCP-47 language code for transcription (e.g. `'en-US'`, `'es'`, `'fr'`). * @default 'en-US' */ language?: string; /** * Emit partial (interim) transcript results before a segment is finalized. * @default true */ interimResults?: boolean; /** * Add punctuation to transcripts. * @default true */ punctuate?: boolean; /** * Apply smart formatting (dates, times, currency, etc.) to transcripts. * @default true */ smartFormat?: boolean; /** * Audio sample rate in Hz. Note: this is fixed at 48000 and * has no effect; non-48000 values are ignored. * @default 48000 */ sampleRate?: number; /** * Silence duration in milliseconds used to detect end of speech (endpointing). * @default 50 */ endpointing?: number; /** * Include filler words (e.g. "uh", "um") in transcripts. * @default true */ fillerWords?: boolean; /** * Keywords to boost recognition for, optionally with intensifiers * (e.g. `'Deepgram:2'`). `null` to disable. * @default null */ keywords?: string[] | null; /** * Key terms to boost recognition for (newer keyterm prompting). `null` to disable. * @default null */ keyterm?: string[] | null; /** * Remove profanity from transcripts. * @default false */ profanityFilter?: boolean; /** * Convert spoken numbers into numeric digits. * @default false */ numerals?: boolean; /** * Free-form tag(s) attached to the request for tracking/usage reporting. * `null` to disable. * @default null */ tag?: string | string[] | null; /** * Enable speaker diarization (label which speaker said what). * @default false */ enableDiarization?: boolean; /** * Redaction categories to remove from transcripts (e.g. `'pci'`, `'ssn'`, * `'numbers'`). `null` to disable. * @default null */ redact?: string | string[] | null; /** * Deepgram streaming endpoint URL. * @default 'wss://api.deepgram.com/v1/listen' */ baseUrl?: string; /** Additional/forward-compatible Deepgram options; unknown keys are accepted and passed through. */ [key: string]: any; }; declare class DeepgramSTTImpl extends STT { static readonly displayName = "DeepgramSTT"; _providerName: string; apiKey: string | null; model: string; language: string; sampleRate: number; endpointing: number; interimResults: boolean; punctuate: boolean; smartFormat: boolean; fillerWords: boolean; keywords: string[] | null; keyterm: string[] | null; profanityFilter: boolean; numerals: boolean; tag: string | string[] | null; enableDiarization: boolean; diarize: boolean; redact: string | string[] | null; baseUrl: string; constructor(opts?: DeepgramSTTOptions); getRuntimeConfig(): Record; } /** Instance type produced by the {@link DeepgramSTT} factory. */ export type DeepgramSTT = DeepgramSTTImpl; /** * Deepgram speech-to-text (STT) provider. * * Creates a configured Deepgram STT instance for use in a voice agent. * * @param opts - Provider options; see {@link DeepgramSTTOptions}. * @returns A configured Deepgram STT provider instance. */ export declare const DeepgramSTT: (opts?: DeepgramSTTOptions) => DeepgramSTT; export {};