import { STT } from '../../agents/providers.js'; import type { GoogleSTTModel } from './models.js'; /** Configuration options for the Google Cloud speech-to-text (STT) provider. */ export type GoogleSTTOptions = { /** Google API key. Falls back to the `GOOGLE_API_KEY` environment variable, then `null`. */ apiKey?: string | null; /** Recognition language(s) as BCP-47 tags (e.g. `'en-US'`), a single string or an array (joined with commas). Default `'en-US'`. */ languages?: string | string[]; /** Recognition model. Default `'latest_long'`. */ model?: GoogleSTTModel | string; /** Input audio sample rate in Hz. Default `48000`. */ sampleRate?: number; /** Service-account credentials, as a raw JSON string or parsed object. Default `null`. */ credentialsJson?: string | Record | null; /** Path to a service-account JSON key file. Read when `credentialsJson` is not provided. */ serviceAccountPath?: string | null; /** Google Cloud project id. Default `null` (derived from the service-account JSON when omitted). */ projectId?: string | null; /** Recognizer location/region. Default `'us'`. */ location?: string; /** Use streaming recognition. Default `true`. */ stream?: boolean; /** Number of audio channels in the input. Default `1`. */ audioChannelCount?: number; /** Emit interim (non-final) transcription results. Default `true`. */ interimResults?: boolean; /** Add automatic punctuation to transcripts. Default `true`. */ punctuate?: boolean; /** Filter profanity from transcripts. Default `false`. */ profanityFilter?: boolean; /** Recognize spoken punctuation (e.g. "comma" -> ","). Default `false`. */ enableSpokenPunctuation?: boolean; /** Recognize spoken emojis. Default `false`. */ enableSpokenEmojis?: boolean; /** Include per-word start/end time offsets. Default `false`. */ enableWordTimeOffsets?: boolean; /** Include per-word confidence scores. Default `false`. */ enableWordConfidence?: boolean; /** Maximum number of recognition alternatives to return. Default `1`. */ maxAlternatives?: number; /** Emit voice-activity (speech begin/end) events. Default `false`. */ enableVoiceActivityEvents?: boolean; /** Timeout in seconds to wait for speech to start. Default `null` (no timeout). */ speechStartTimeout?: number | null; /** Timeout in seconds of silence marking speech end. Default `null` (no timeout). */ speechEndTimeout?: number | null; /** Minimum number of speakers for diarization. Default `null`. */ minSpeakerCount?: number | null; /** Maximum number of speakers for diarization. Default `null`. */ maxSpeakerCount?: number | null; /** Minimum confidence threshold for accepting results, `0.0`-`1.0`. Default `0.0`. */ minConfidenceThreshold?: number; /** Additional/forward-compatible options. */ [key: string]: any; }; declare class GoogleSTTImpl extends STT { static readonly displayName = "GoogleSTT"; _providerName: string; apiKey: string | null; model: string; language: string; sampleRate: number; serviceAccountJson: string | null; projectId: string | null; location: string; stream: boolean; audioChannelCount: number; interimResults: boolean; punctuate: boolean; profanityFilter: boolean; enableSpokenPunctuation: boolean; enableSpokenEmojis: boolean; enableWordTimeOffsets: boolean; enableWordConfidence: boolean; maxAlternatives: number; enableVoiceActivityEvents: boolean; speechStartTimeout: number | null; speechEndTimeout: number | null; minSpeakerCount: number | null; maxSpeakerCount: number | null; minConfidenceThreshold: number; constructor(opts?: GoogleSTTOptions); getRuntimeConfig(): Record; } /** A configured Google Cloud STT provider instance. */ export type GoogleSTT = GoogleSTTImpl; /** Google Cloud speech-to-text (STT) provider. */ export declare const GoogleSTT: (opts?: GoogleSTTOptions) => GoogleSTT; export {};