Gemini STT
GeminiSTT transcribes with a multimodal Gemini model (gemini-2.5-flash) instead of a dedicated speech recogniser. It buffers the caller’s audio for the whole turn and, at VAD speech-end, sends the utterance as audio. The model returns the transcript and its judgement of how the caller sounded:
Beta. The adapter is validated against the Google Gen AI SDK surface; it has
not yet been exercised against a live phone call.
Install
Authentication
GEMINI_API_KEY is read automatically when api_key / apiKey is omitted, with GOOGLE_API_KEY as the second fallback.
Usage
Use the namespaced import (
getpatter.stt.gemini) or the flat re-export
(GeminiSTT). Both auto-resolve the key from the environment.Turn semantics
send_audioonly buffers. Nothing is uploaded mid-turn.finalize()— fired by the pipeline on VAD speech-end — uploads the whole utterance as a WAV and produces exactly one transcript withis_finalandspeech_finalset.close()flushes a turn that never got a speech-end, so trailing words are not lost.- One request per turn is deliberate: tone is judged over the full utterance, and a windowed upload would split one utterance across requests.
Failure behaviour
A model error or an unreachable host is logged at ERROR and yields no transcript — it never raises into the call. A live call degrades to a missed turn rather than dropping.Options
There is no
language option: the model reads the language from the audio itself.

