Skip to main content

Deepgram TTS

How to use Deepgram TTS with LiveKit Agents.

Use in Agent Builder

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 IDLanguages
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 AgentSession
session = 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, inference
session = 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.
});
modelstringRequired

The model ID from the models list.

voicestringRequired

See voices for guidance on selecting a voice.

languagestringOptional

Language code for the input text. If not set, the model default applies.

extra_kwargsdictOptional

Additional 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.

Apollo

Comfortable, casual male

🇺🇸
Athena

Smooth, professional female

🇺🇸
Odysseus

Calm, professional male

🇺🇸
Theia

Expressive, polite female

🇦🇺

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.

Available in
Python
|
Node.js

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 deepgram
session = 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.

modelstringOptionalDefault: aura-2-asteria-en

ID 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.