Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
DeepgramSTT
Speech-to-text with Deepgram’s streaming Nova models. Good for low-latency English and multilingual transcription with keyword boosting and smart formatting. Authenticates with DEEPGRAM_API_KEY from your environment, or an explicitapi_key.
Fields
Deepgram model to transcribe with, e.g. “nova-2” or “nova-3”. For Flux models use DeepgramSTTV2. Defaults to ‘nova-2’.
BCP-47 language code to transcribe, e.g. “en-US” or “es”. Use “multi” with Nova-3 for code-switching speech. Defaults to ‘en-US’.
Send partial transcripts to the client while the user is still speaking, in addition to final ones. Defaults to True.
Format numbers, dates, currencies, emails and similar entities for readability. Defaults to True.
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Milliseconds of silence before Deepgram finalizes an utterance. Set 0 to turn endpointing off. Defaults to 50.
Words to boost or suppress, optionally with an intensifier, e.g. “kansas:-10”. Nova-2 and older models only; up to 100 entries. Defaults to None (not set).
Key terms or phrases to improve recognition of, e.g. “tretinoin”. Nova-3 only; up to 500 tokens in total. Defaults to None (not set).
One or more labels attached to requests for usage reporting in the Deepgram console. Defaults to None (not set).
Deepgram streaming endpoint URL. Change it only for a self-hosted or regional deployment. Defaults to ‘wss://api.deepgram.com/v1/listen’.
Number of audio channels the agent receives. Leave unset to detect it automatically. Defaults to None (not set).
DeepgramSTTV2
Speech-to-text with Deepgram Flux, which combines transcription with built-in end-of-turn detection. Choose it for natural, low-latency turn-taking in voice agents. Authenticates with DEEPGRAM_API_KEY from your environment, or an explicitapi_key.
Fields
Flux model to transcribe with: “flux-general-en” for English or “flux-general-multi” for multilingual speech. Defaults to ‘flux-general-en’.
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Sample rate in Hz that audio is resampled to before it is sent to Deepgram, e.g. 16000. Defaults to None (not set).
Confidence, 0 to 1, at which Flux signals an early end of turn. Lower values react sooner but more often prematurely. Defaults to 0.6.
Confidence, 0 to 1, required before Flux declares the user’s turn finished. Higher values wait for more certainty. Defaults to 0.8.
Milliseconds of silence after which the turn ends regardless of confidence. Defaults to 7000.
Key terms or phrases to improve recognition of, e.g. “tretinoin” or “customer service”. Up to 500 tokens in total. Defaults to None (not set).
Language codes to bias recognition toward, e.g. [“en”, “es”]. Only applies to flux-general-multi. Defaults to None (not set).
One or more labels attached to requests for usage reporting in the Deepgram console. Defaults to None (not set).
Deepgram streaming endpoint URL. Change it only for a self-hosted or regional deployment. Defaults to ‘wss://api.deepgram.com/v2/listen’.
Start generating a reply on an early end-of-turn signal to cut response latency. The draft is discarded if the user keeps talking. Defaults to False.
Number of audio channels the agent receives. Leave unset to detect it automatically. Defaults to None (not set).