Create a new agent in your browser using this model
Overview
Deepgram text-to-speech is available in LiveKit Agents through LiveKit Inference and the Deepgram plugin. With LiveKit Inference, your agent runs on LiveKit's infrastructure to minimize latency. No separate provider API key is required, and usage and rate limits are managed through LiveKit Cloud. Use the plugin instead if you want to manage your own billing and rate limits. Pricing for LiveKit Inference is available on the pricing page .
LiveKit Inference
Use LiveKit Inference to access Deepgram TTS without a separate Deepgram API key.
| Model name | Model ID | Languages |
|---|---|---|
Aura-2 | deepgram/aura-2 | enen-USen-PHen-GBen-AUeses-COes-MXes-ESes-419es-ARnlnl-NLfrfr-FRdede-DEitit-ITjaja-JP |
Flux TTS | deepgram/flux-tts | enen-USen-GBen-AUen-IN |
Aura-1 Retired | deepgram/aura | enen-USen-IEen-GB |
Usage
To use Deepgram, use the TTS class from the inference module:
from livekit.agents import AgentSession, inferencesession = AgentSession(tts=inference.TTS(model="deepgram/aura-2",voice="athena",language="en"),# ... stt, llm, vad, turn_handling, etc.)
import { AgentSession, inference } from '@livekit/agents';session = new AgentSession({tts: new inference.TTS({model: "deepgram/aura-2",voice: "athena",language: "en"}),// ... stt, llm, vad, turnHandling, etc.});
Parameters
modelstringThe model ID from the models list.
voicestringSee voices for guidance on selecting a voice.
languageLanguageCodeLanguage code for the input text. If not set, the model default applies.
extra_kwargsdictAdditional parameters to pass to the Deepgram TTS API. See model parameters for supported fields.
In Node.js this parameter is called modelOptions.
Model parameters
Pass the following parameters inside extra_kwargs (Python) or modelOptions (Node.js):
| Parameter | Type | Default | Notes |
|---|---|---|---|
mip_opt_out | bool | False | Opt out of the Deepgram Model Improvement Program . |
Voices
LiveKit Inference supports Deepgram Aura voices. You can explore the available voices in the Deepgram voice library , and use the voice by copying its name into your LiveKit agent session.
The following is a small sample of the Deepgram voices available in LiveKit Inference.
String descriptors
As a shortcut, you can also pass a descriptor with the model ID and voice directly to the tts argument in your AgentSession:
from livekit.agents import AgentSessionsession = AgentSession(tts="deepgram/aura-2:athena",# ... stt, llm, vad, turn_handling, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({tts: "deepgram/aura-2:athena",// ... stt, llm, vad, turnHandling, etc.});
Plugin
LiveKit's plugin support for Deepgram lets you connect directly to Deepgram's TTS API with your own API key. The plugin provides two TTS classes with separate voices and API endpoints. Use the TTS class for Deepgram's established Aura voices on /v1/speak. Use the TTSv2 class for the newer Flux voices on /v2/speak.
Installation
Install the plugin:
uv add "livekit-agents[deepgram]~=1.5"
pnpm add @livekit/agents-plugin-deepgram@1.x
Authentication
The Deepgram plugin requires a Deepgram API key .
Set DEEPGRAM_API_KEY in your .env file.
Aura
The TTS class covers Deepgram's Aura-2 and Aura-1 voices.
Usage
Use Deepgram Aura TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.
from livekit.plugins import deepgramsession = AgentSession(tts=deepgram.TTS(model="aura-2-asteria-en",)# ... llm, stt, etc.)
import * as deepgram from '@livekit/agents-plugin-deepgram';const session = new voice.AgentSession({tts: new deepgram.TTS({model: "aura-2-asteria-en",}),// ... llm, stt, etc.});
Parameter reference
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
modelstringDefault: aura-2-andromeda-enID of the model to use for generation. Use TTSv2 for Deepgram's Flux voices. To learn more, see supported models .
Flux
The TTSv2 class covers Deepgram's Flux voices.
Usage
Use TTSv2 within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.
from livekit.plugins import deepgramsession = AgentSession(tts=deepgram.TTSv2(model="flux-alexis-en",),# ... llm, stt, etc.)
Parameter reference
This section describes some of the available parameters. See the plugin reference in Additional resources for a complete list of all available parameters.
modelstringDefault: flux-alexis-enThe Flux TTS model to use. Model names follow the flux-{voice}-{language} format, so any available Flux voice works without a plugin update. See Flux TTS in the Deepgram docs for available voices.
mip_opt_outboolDefault: falseOpt out of the Deepgram Model Improvement Program . Check Deepgram docs for pricing impact before setting to True.
Prompting
Deepgram supports filler words and natural pauses through prompting. To learn more, see Text to Speech Prompting .
Additional resources
The following resources provide more information about using Deepgram with LiveKit Agents.
Python package
The livekit-plugins-deepgram package on PyPI.
Plugin reference
Reference for the Deepgram TTS plugin.
GitHub repo
View the source or contribute to the LiveKit Deepgram TTS plugin.
Deepgram docs
Deepgram's full docs site.
Voice AI quickstart
Get started with LiveKit Agents and Deepgram.
Deepgram STT
Guide to the Deepgram STT plugin with LiveKit Agents.