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 |
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.
Installation
Install the plugin:
uv add "livekit-agents[deepgram]~=1.4"
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.
Usage
Use Deepgram 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: deepgram.TTS(model: "aura-2-asteria-en",),// ... llm, stt, etc.});
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
modelstringDefault: aura-2-asteria-enID of the model to use for generation. To learn more, see supported models.
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.