Deepgram
Updated
Integrate Deepgram TTS into Conversational AI Engine.
Deepgram provides low-latency text-to-speech with a wide range of voices, optimized for real-time conversational AI applications.
Info
This integration is fully supported for use with Conversational AI Engine. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.
Sample configuration
The following examples show how to configure Deepgram TTS when starting a conversational AI agent.
from agora_agent import Agent
from agora_agent.agentkit.vendors import DeepgramTTS
# client is your configured Agora client
agent = (
Agent(client)
.with_stt(...) # configure your STT vendor
.with_llm(...) # configure your LLM vendor
.with_tts(DeepgramTTS(
api_key='your-deepgram-key',
model='aura-2-thalia-en',
))
)import { Agent, DeepgramTTS } from 'agora-agents';
// client is your configured Agora client
const agent = new Agent({ client })
.withStt(/* configure your STT vendor */)
.withLlm(/* configure your LLM vendor */)
.withTts(new DeepgramTTS({
apiKey: 'your-deepgram-key',
model: 'aura-2-thalia-en',
}));import "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"
// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
WithLlm(/* configure your LLM vendor */).
WithTts(
vendors.NewDeepgramTTS(vendors.DeepgramTTSOptions{
APIKey: "your-deepgram-key",
Model: "aura-2-thalia-en",
}),
)Use the following tts configuration in your request:
"tts": {
"vendor": "deepgram",
"params": {
"api_key": "<your_deepgram_key>",
"base_url": "wss://api.deepgram.com/v1/speak",
"model": "aura-2-thalia-en",
"sample_rate": 24000
}
}Caution
The parameters listed on this page are validated for use with Conversational AI Engine. Required parameters must be provided as documented. Any additional parameters are passed through directly to the underlying vendor without validation. For a full list of supported options, refer to the Deepgram TTS documentation.
Key parameters
api_keystringThe Deepgram API key used to authenticate requests. Get your API key from the Deepgram Console.
modelstringThe identifier of the TTS model to use. See Deepgram voices and languages.
base_urlstringThe WebSocket URL for the Deepgram streaming API. Defaults to wss://api.deepgram.com/v1/speak.
sample_ratenumberThe audio sampling rate in Hz.
