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
str
default:"UNSET"
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’.
Union[str, list[str], None]
default:"UNSET"
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’.
list[str] | None
default:"UNSET"
Up to 1,000 words or phrases, such as names and product terms, to recognize more reliably. Defaults to None (not set).
bool
default:"True"
Emit partial transcripts while the user is still speaking. Live models only. Defaults to True.
Literal['verbatim', 'smart'] | None
default:"UNSET"
“verbatim” keeps the exact words; “smart” removes fillers and disfluencies and adds formatting. Defaults to None (not set).
Literal['high', 'low'] | None
default:"UNSET"
“high” detects the start of speech sooner; “low” ignores more background noise. Live models only. Defaults to None (not set).
Literal['high', 'low'] | None
default:"UNSET"
“high” ends a turn sooner after the speaker stops, for faster final transcripts; “low” waits longer. Live models only. Defaults to None (not set).
int | None
default:"UNSET"
Milliseconds of audio kept from just before detected speech, so first syllables are not cut off. Live models only. Defaults to None (not set).
int | None
default:"UNSET"
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).
int | None
default:"UNSET"
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
int | None
default:"UNSET"
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
Union[str, list[str]]
default:"UNSET"
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’.
str
default:"UNSET"
Recognition model, e.g. “latest_long”, “latest_short”, “chirp_2” or “chirp_3”. Defaults to ‘latest_long’.
int | None
default:"UNSET"
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
int | None
default:"UNSET"
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).
int | None
default:"UNSET"
Deprecated alias for output_sample_rate; do not pass both. Defaults to None (not set).
bool
default:"True"
Set to True to emit partial transcripts while the user is still speaking. Defaults to True.
bool
default:"UNSET"
Whether to add automatic punctuation to transcripts. Defaults to True.
float
default:"0.0"
Transcripts with a confidence score below this value, 0.0 to 1.0, are discarded. Defaults to 0.0.
str
default:"UNSET"
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’.
bool
default:"UNSET"
Set to True to mask profane words, keeping only the first letter followed by asterisks. Defaults to False.
bool
default:"UNSET"
Set to True to receive speech start and end events from Google and apply voice_activity_timeout. Defaults to False.
Mapping[str, Any]
default:"UNSET"
Speech timeouts, e.g. {“speech_start_timeout”: 5, “speech_end_timeout”: 1}. Requires enable_voice_activity_events. Defaults to None (not set).
Optional[str]
default:"UNSET"
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).
Optional[int]
default:"UNSET"
Number of audio channels in incoming audio. Leave unset to detect it automatically. Defaults to None (not set).