Deepgram STT
DeepgramSTT streams PCM (or mulaw / opus / flac) audio to Deepgram’s v1 /listen WebSocket endpoint. Pure websockets transport, no vendor SDK required. Handles KeepAlive pings, Finalize / CloseStream graceful shutdown, and surfaces both Results transcripts and SpeechStarted / UtteranceEnd VAD events.
Install
deepgram ships in the base install — no extra needed.
Usage
Use the namespaced import (
getpatter.stt.deepgram) or the flat alias
(getpatter.DeepgramSTT). Both auto-resolve DEEPGRAM_API_KEY from the
environment when api_key= is omitted.Models and rates
Deepgram bills per minute of streamed audio. Per-model rates (defaults fromgetpatter.pricing):
Override per-call via
Patter(pricing={"deepgram": {"models": {"nova-2": {"price": ...}}}}).
Languages
language="en" by default. Pass any Deepgram-supported BCP-47 code (e.g. "es", "fr", "de", "it"). For mixed-language calls use nova-3-multilingual.

