Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

DeepgramTTS

Text-to-speech with Deepgram’s Aura and Flux voices over a streaming connection. Good for fast, natural-sounding agent replies. Authenticates with DEEPGRAM_API_KEY from your environment, or an explicit api_key.

Fields

str
default:"UNSET"
Voice model to synthesize with, e.g. “aura-2-andromeda-en” or “aura-2-thalia-en”. Flux voices use names like “flux-…-en”. Defaults to ‘aura-2-andromeda-en’.
str
default:"UNSET"
Output audio encoding, e.g. “linear16”, “mulaw” or “alaw”. Defaults to ‘linear16’.
int
default:"UNSET"
Output audio sample rate in Hz, e.g. 8000, 16000, 24000 or 48000. Defaults to 24000.
str
default:"UNSET"
Deepgram speak endpoint URL. Leave unchanged unless you use a self-hosted or regional deployment. Defaults to ‘wss://api.deepgram.com/v1/speak’.
float | None
default:"UNSET"
Seconds after which the streaming connection is refreshed to avoid Deepgram session limits. Unset means 300 s for Aura, or 3300 s for Flux, which keeps voice context per connection. Defaults to None (not set).
float | None
default:"UNSET"
Speaking rate multiplier: 0.7 to 1.5 for Aura voices, 0.5 to 1.5 for Flux voices. Defaults to None (not set).
int | None
default:"UNSET"
Flux voices only, beta: delivery from -2 (calm) to 2 (animated). Ignored by Aura voices. Defaults to None (not set).