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 explicitapi_key.
Fields
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’.
Output audio encoding, e.g. “linear16”, “mulaw” or “alaw”. Defaults to ‘linear16’.
Output audio sample rate in Hz, e.g. 8000, 16000, 24000 or 48000. Defaults to 24000.
Deepgram speak endpoint URL. Leave unchanged unless you use a self-hosted or regional deployment. Defaults to ‘wss://api.deepgram.com/v1/speak’.
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).
Speaking rate multiplier: 0.7 to 1.5 for Aura voices, 0.5 to 1.5 for Flux voices. Defaults to None (not set).