Deepgram
Text-to-speech
Deepgram’s Aura model offers a wide range of voices for its text-to-speech API, each designed to produce natural-sounding speech output in an array of different accents and speaking styles.
Deepgram voices have human-like tones, rhythm, and emotion, lower than 250 ms latency, and are optimized for high-throughput applications.
Consult Deepgram’s TTS models guide for more information and samples for supported voices.
Models
Deepgram’s Aura model provides ultra-low latency text-to-speech optimized for conversational AI:
Voices
Press play to audition any Deepgram voice, then copy config to grab the value for SWML or your SDK.
Deepgram Aura voices are designed for natural-sounding English speech. Each voice follows the pattern aura-<name>-en.
Popular voices include:
aura-asteria-en- Clear, professional female voiceaura-luna-en- Warm, conversational female voiceaura-stella-en- Energetic, friendly female voiceaura-athena-en- Authoritative female voiceaura-hera-en- Mature, confident female voiceaura-orion-en- Deep, authoritative male voiceaura-arcas-en- Professional male voiceaura-perseus-en- Friendly male voiceaura-angus-en- Casual male voiceaura-orpheus-en- Smooth, articulate male voiceaura-helios-en- Energetic male voiceaura-zeus-en- Powerful, commanding male voice
For a complete list, consult Deepgram’s Voice Selection guide.
Usage
Deepgram voice IDs conform to the following format:
Where <voice> is the voice identifier from Deepgram’s Voice Selection reference.
Copy the voice ID from the Values column of Deepgram’s Voice Selection reference, prepend deepgram., and the string is ready for use.
Examples:
Use Deepgram voices on a call
A Deepgram voice string such as deepgram.aura-asteria-en works in each of these places: an AI
agent’s languages, the say_voice of SWML’s play, and a tts media item sent with Relay or
the REST Calling API. The examples below all use deepgram.aura-asteria-en. To control speech while it plays, see
Speak text on a call.
Replace these values in the samples:
Give an AI agent a Deepgram voice via SWML
The languages list of the SWML
ai method sets the voice an AI agent speaks in. The
Server SDKs build the document and serve it at /swml on port 3000, only to
requests that carry the username signalwire and your password.
To send calls from your phone number to the server, follow Answer a call via SWML. Call the number, and the agent greets you in the Deepgram voice. If you hear a different voice, the voice string isn’t in SignalWire’s catalog, so the call falls back to a default voice. See Custom and cloned voices.
Speak text in a Deepgram voice via SWML
The SWML builder’s say() writes a play with a say: URL
and the voice in say_voice. This server speaks one sentence in the Deepgram voice, then hangs up.
Serve it and point your number at it the same way as the AI agent above.
Speak text in a Deepgram voice via WebSocket (Relay)
A Relay client in the Server SDKs passes the voice string in a tts media
item. This handler answers calls on the default topic, speaks in the Deepgram voice, and hangs
up when the speech ends.
To route calls from your phone number to the handler, assign the number to a Relay Application
on the default topic, as described in
Answer a call via WebSocket (Relay).
Call the number to hear the sentence. If you hear a different voice, SignalWire couldn’t use the
voice string and played a fallback voice. If the play is rejected as a bad request, check the voice
string for characters a tts item doesn’t accept, such as spaces, parentheses, or /.
Speak text in a Deepgram voice on a call in progress via REST
To speak on a call that’s already up, such as from a backend job, send
calling.play with the call’s ID and the same tts media
item. control_id names the playback so later commands can stop or pause it.
The command returns once SignalWire accepts it, and the call hears the sentence in the Deepgram
voice.
If the call hears a different voice, SignalWire couldn’t use the voice string and played a fallback
voice. If the call hears nothing, check the voice string for characters a tts item doesn’t
accept, such as spaces, parentheses, or /. The request can return success
even when the voice string is rejected.
Create a SWML Script that uses a Deepgram voice
A SWML Script hosted in SignalWire runs the Deepgram-voiced AI agent above without a server of your own.
- In the Dashboard, open My Resources, select + Add, then Script, then SWML Script.
- Name the script and leave Used For set to Calling.
- Under Handle Calls Using, choose Hosted Script and paste this document into Primary Script.
- Select Create.
Assign the script to your phone number as in Answer a call via SWML, then call the number. The agent answers in the Deepgram voice.