14 skills · 80 min
Skills
Skill 13 of 14
Turn text into spoken audio with Deepgram.
6 minutes · 1,235 words · 10 sections
Install
npx skills add deepgram/skills --skill text-to-speechnpx skills add deepgram/skills/plugin marketplace add deepgram/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Deepgram serves two text-to-speech families on separate endpoints, and the voices do not overlap.
Aura voices run only on /v1/speak. Flux TTS voices run only on /v2/speak. /v2/speak is an
additional endpoint. /v1/speak is unchanged and remains supported.
| Need | Family | Endpoint |
|---|---|---|
| One-shot audio: a file, an IVR prompt, a notification | Aura | POST https://api.deepgram.com/v1/speak |
| Any language other than English | Aura-2 | /v1/speak |
| Low-latency stream with manual flush control | Aura | wss://api.deepgram.com/v1/speak |
| A voice agent that streams LLM output and must survive barge-in | Flux TTS | wss://api.deepgram.com/v2/speak |
| Pre-rendered audio in a Flux voice | Flux TTS batch | POST https://api.deepgram.com/v2/speak |
Rule of thumb: Aura for one-shot and non-English, Flux TTS for voice agents. Flux TTS voices are English only today; for other languages use Aura-2.
curl --request POST \
--url "https://api.deepgram.com/v1/speak?model=aura-2-thalia-en&encoding=linear16&container=wav" \
--header "Authorization: Token $DEEPGRAM_API_KEY" \
--header "Content-Type: application/json" \
--data '{"text": "Hello, how can I help you today?"}' \
--output hello.wav \
--fail-with-body --silent || echo "Request failed"What to expect:
text.encoding, REST returns mp3. For WAV send encoding=linear16&container=wav. Other REST
encodings: opus, flac, aac, mulaw, alaw, with container, bit_rate, sample_rate.model, /v1/speak uses aura-asteria-en, an Aura-1 voice. Always set model.speed accepts 0.7 to 1.5 and works for English and Spanish voices only.Connect to wss://api.deepgram.com/v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000
with the same Authorization: Token header. Send JSON text frames: {"type":"Speak","text":"..."} to
queue text, {"type":"Flush"} to force audio out, {"type":"Clear"} to drop the buffer, and
{"type":"Close"} to end. Audio arrives as binary frames; Metadata, Flushed, Cleared, and
Warning arrive as JSON. Send Flush when the LLM finishes a response. Flush is limited to 20
sends per 60 seconds. Streaming output is raw linear16 (default), mulaw, or alaw only.
Connect to wss://api.deepgram.com/v2/speak?model=flux-haley-en. model is required and must be a
flux-* voice. There is no default, and an Aura string is rejected.
A session is a sequence of turns. Stream tokens in, then end the turn:
{"type": "Speak", "text": "Sure, I can "}
{"type": "Speak", "text": "help you cancel your subscription."}
{"type": "Flush"}Flush. Flush ends the turn; the server then sends Flushed and
SpeechMetadata with billing and timing. Treat SpeechMetadata as the end of the turn; Flushed arrives earlier.speech_id per turn in SpeechStarted and SpeechMetadata. Never send one.{"type":"Interrupt","playback_offset":{"type":"time_ms","value":2340}}. SpeechInterrupted returns
text_spoken and text_remaining; feed text_spoken back into the LLM context. Without a
playback_offset the split is omitted.{"type":"Configure","speed":1.15} changes speed mid-session. speed runs 0.5 to 1.5 in 0.05
increments, default 1.0. 0.45 and 1.55 return 'speed' must be between 0.5 and 1.5, and
1.07 returns 'speed' must be provided in increments of 0.05. Errors:
SPEED_OUT_OF_RANGE, SPEED_INCREMENT_INVALID, SPEED_NOT_SUPPORTED.expressivity runs -2 (calm) to 2 (animated), default 0. Values must be whole numbers; a
fractional value returns EXPRESSIVITY_INCREMENT_INVALID and an out-of-range one
EXPRESSIVITY_OUT_OF_RANGE. It is beta, fixed per connection (Configure cannot change it), and
only 0 is validated for production.linear16 (default), mulaw, or alaw. Batch-only parameters (container,
bit_rate, callback, callback_method, priority) and any unknown parameter fail the connection.NET-0004). Send a WebSocket Ping between quiet turns.POST https://api.deepgram.com/v2/speak?model=flux-haley-en with {"text": "..."} returns one
audio response, mp3 by default, and accepts opus, flac, aac, container, bit_rate.aura-2-{voice}-{lang} in English, Spanish, German, French, Dutch, Italian, and Japanese, plus
twelve Aura-1 English voices named aura-{voice}-en. Catalog: https://developers.deepgram.com/docs/tts-models (opens in a new tab)flux-{voice}-en, English only, in American, British, Irish, Australian, Indian,
Singaporean, and Filipino accents. Featured voices include flux-haley-en, flux-alexis-en, and
flux-kit-en. Catalog: https://developers.deepgram.com/docs/flux-tts/voices (opens in a new tab)Text-to-speech is billed per 1,000 characters of input text, for Flux TTS, Aura-2, and Aura-1 alike. Rates differ by model and plan and change over time. Read them at https://deepgram.com/pricing (opens in a new tab); do not quote figures from memory.
Authorization: Token <key>. Bearer is only for the short-lived
JWT from POST https://api.deepgram.com/v1/auth/grant. A key sent with Bearer returns 401.{"err_code":"INSUFFICIENT_PERMISSIONS","err_msg":"Project does not have access to the requested model."} comes back both for a model the project cannot use and for a
misspelled model name. Before asking for access, check the
name against the catalogs above and against GET https://api.deepgram.com/v1/models, whose tts
list shows the models your key can use./v2/speak and a Flux voice on /v1/speak both fail, and
/v2/speak also rejects a missing model.mp3. Streaming is raw audio on both endpoints. Use REST for compressed output.Speak texts are concatenated verbatim, so
"Hello world." then "How are you?" becomes "Hello world.How are you?". Insert a space when you
stitch a reply, a tool result, and another reply. SSML is stripped with an INPUT_MARKUP_STRIPPED
warning; send plain text.wss://agent.deepgram.com
and picks the TTS family from agent.speak.provider.version: v2 for Flux TTS, v1 for Aura.
Omitting agent.speak gives Flux TTS with flux-kit-en.speed on a German, French, Dutch, Italian, or Japanese voice. Aura-2 speed control
covers English and Spanish only.api skill, file references/speak.md.docs skill.starters skill. Features are text-to-speech (Aura REST),
live-text-to-speech (Aura WebSocket), and flux-tts (node, flask, fastapi, django, java only).recipes skill. Recipes cover Aura on /v1/speak only; there
are no Flux TTS recipes yet.examples skill (Aura today). For Twilio with Flux TTS,
follow https://developers.deepgram.com/docs/twilio-and-deepgram-tts (opens in a new tab).setup-mcp skill.deepgram-{js,python,java,go,rust,dotnet}-text-to-speech
skills from the SDK repositories (npx skills add deepgram/deepgram-python-sdk, and so on). Every SDK
but Go carries a Flux TTS client; see the SDK note above for what each one calls it.voice-agent skill and
deepgram-{lang}-voice-agent.speech-to-text skill. Note that “Flux” names both a
speech-to-text product on /v2/listen and this text-to-speech product on /v2/speak.All pages fetched September 2026 as Markdown (append .md to any URL); index at https://developers.deepgram.com/llms.txt (opens in a new tab).
Turn text into spoken audio with Deepgram. Use when someone asks for text-to-speech, TTS, speech synthesis, a synthetic voice, a voice for a voice agent, an IVR prompt, or an audio version of some text, and whenever they mention Aura, Aura-2, Flux TTS, /v1/speak or /v2/speak. Trigger phrases: "text to speech", "TTS", "speak endpoint", "generate speech", "synthesize audio", "read this aloud", "which Deepgram voice", "Aura vs Flux TTS", "TTS with barge-in". Gets an agent to a correct first request, then routes to the api, docs, starters, recipes, examples, setup-mcp and per-language SDK text-to-speech skills.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 20 September 2026.SKILL.md, not by matching a directory convention. One layout observed: skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Deepgram Developer Relations, declaring 7 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree.speak.v2FluxSpeakRESTClientFluxSpeakWebSocketClientspeak::flux/deepgram/skills.md.md