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. Pricing for LiveKit Inference is available on the pricing page.
| Model ID | Languages |
|---|---|
| deepgram/aura-2 | enes |
LiveKit Inference
Use LiveKit Inference to access Deepgram TTS without a separate Deepgram API key.
Usage
To use Deepgram, pass a descriptor with the model and voice to the tts argument in your AgentSession:
from livekit.agents import AgentSessionsession = AgentSession(tts="deepgram/aura-2:athena",# ... stt, llm, vad, turn_detection, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({tts: "deepgram/aura-2:athena",// ... stt, llm, vad, turn_detection, etc.});
Parameters
To customize additional parameters, 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_detection, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({tts: new inference.TTS({model: "deepgram/aura-2",voice: "athena",language: "en"}),// ... stt, llm, vad, turn_detection, etc.});
stringRequiredThe model ID from the models list.
stringRequiredSee voices for guidance on selecting a voice.
stringOptionalLanguage code for the input text. If not set, the model default applies.
dictOptionalAdditional parameters to pass to the Deepgram TTS API. See the provider's documentation for more information.
In Node.js this parameter is called modelOptions.
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.
Prompting
Deepgram supports filler words and natural pauses through prompting. To learn more, see Text to Speech Prompting.
Plugin
Use the Deepgram plugin to 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.
stringOptionalDefault: aura-2-asteria-enID of the model to use for generation. To learn more, see supported models.
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.