Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
GeminiSTT
Speech-to-text with Gemini 3.5 Transcribe, using your Gemini API key. Live models stream partial and final transcripts; “gemini-3.5-transcribe” transcribes each turn once it ends and needs voice activity detection. Authenticates with GOOGLE_API_KEY from your environment, or an explicitapi_key.
Fields
Transcribe model, e.g. “gemini-3.5-transcribe-live” for streaming or “gemini-3.5-transcribe” for per-turn transcription. Defaults to ‘gemini-3.5-transcribe-live’.
BCP-47 language code or list of codes, e.g. “en-US” or [“hi-IN”, “en-IN”]. Set to None to auto-detect the language. Defaults to ‘en-US’.
Up to 1,000 words or phrases, such as names and product terms, to recognize more reliably. Defaults to None (not set).
Emit partial transcripts while the user is still speaking. Live models only. Defaults to True.
“verbatim” keeps the exact words; “smart” removes fillers and disfluencies and adds formatting. Defaults to None (not set).
“high” detects the start of speech sooner; “low” ignores more background noise. Live models only. Defaults to None (not set).
“high” ends a turn sooner after the speaker stops, for faster final transcripts; “low” waits longer. Live models only. Defaults to None (not set).
Milliseconds of audio kept from just before detected speech, so first syllables are not cut off. Live models only. Defaults to None (not set).
Milliseconds of silence before a turn is finalized. Lower is faster but may split sentences at pauses. Live models only. Defaults to None (not set).
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Number of channels in the incoming audio. Leave unset to detect it automatically. Defaults to None (not set).
GoogleSTT
Streaming speech-to-text with Google Cloud Speech-to-Text, authenticated with a service account. Choose it for broad language coverage and Google’s Chirp models. Authenticates with GOOGLE_APPLICATION_CREDENTIALS from your environment, or an explicitapi_key.
Fields
BCP-47 language code, or a list of codes for multilingual recognition, e.g. “en-US” or [“en-US”, “es-US”]. Defaults to ‘en-US’.
Recognition model, e.g. “latest_long”, “latest_short”, “chirp_2” or “chirp_3”. Defaults to ‘latest_long’.
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Sample rate in Hz of the audio sent to Google. Set a lower value such as 16000 only if you want audio downsampled before recognition. Defaults to None (not set).
Deprecated alias for output_sample_rate; do not pass both. Defaults to None (not set).
Set to True to emit partial transcripts while the user is still speaking. Defaults to True.
Transcripts with a confidence score below this value, 0.0 to 1.0, are discarded. Defaults to 0.0.
Google Cloud region for recognition, e.g. “global”, “us” or “eu”. chirp_3 is only served from “us” or “eu” and uses “us” in place of “global”. Defaults to ‘global’.
Set to True to mask profane words, keeping only the first letter followed by asterisks. Defaults to False.
Set to True to receive speech start and end events from Google and apply voice_activity_timeout. Defaults to False.
Speech timeouts, e.g. {“speech_start_timeout”: 5, “speech_end_timeout”: 1}. Requires enable_voice_activity_events. Defaults to None (not set).
How quickly a result is finalized after speech ends: “standard”, “short” or “supershort” (lowest latency). Needs a supporting model such as “chirp_3”. Defaults to None (not set).