Skip to main content
Speech

Text to Speech

Convert text to natural-sounding speech — Indic, English and multilingual TTS models behind one OpenAI-compatible endpoint.

Overview

The Text to Speech API converts text into audio with any of 10 TTS models. The default, bulbul:v3, has 37 voices across 11 Indian languages. bulbul:v4-flash is a lower-latency, lower-cost alternative with 222 persona voices across 9 Indian languages and Hinglish.

Two models are on the free tier: bulbul:v3 and bulbul:v4-flash. The retired aura-2-en, aura-2-es and melotts IDs still work and stay free; they are answered by deepgram-aura-2 (same voices) and gpt-4o-mini-tts — see Retired and deprecated models.

Endpoint: POST /v1/audio/speech

  1. 1

    Your app

    Send text + a and to

  2. 2

    Your chosen model

    Synthesize speech in the chosen voice — if is omitted

  3. 3

    Your app

    Receive the audio stream and play or save it

Basic Usage

from openai import OpenAI

client = OpenAI(
    api_key="cm_your_key",
    base_url="https://api.callmissed.com/v1"
)

response = client.audio.speech.create(
    model="bulbul:v3",
    voice="shubh",
    input="Namaste, kaise hain aap?"
)

response.stream_to_file("speech.mp3")

Parameters

Send a JSON body.

ParameterTypeRequiredDescription
inputstringYesText to synthesize, up to 4096 characters. Some models accept less: bulbul:v3 2500, bulbul:v4-flash 2500, deepgram-aura-2 / deepgram-aura-1 2000, deepgram-flux-tts 2000 with stream: true and 400 without
modelstringNoDefault bulbul:v3. One of bulbul:v3, bulbul:v4-flash, sonic-3.6, gnani-timbre-v3.0, deepgram-aura-2, deepgram-aura-1, deepgram-flux-tts, gpt-4o-mini-tts, mai-voice-2.1, mai-voice-2.1-flash, or an ElevenLabs model: eleven_v4, eleven_v4_turbo, eleven_v3, eleven_v3_conversational, eleven_multilingual_v2, eleven_flash_v2_5, eleven_turbo_v2_5, eleven_flash_v2, eleven_turbo_v2 — see Models
voicestringNoVoice ID — default shubh for bulbul:v3, shubh_enhi_ads for bulbul:v4-flash (v3 names such as shubh are not valid there), skylar for sonic-3.6, sarah for the eleven_* models (a premade name or any ElevenLabs voice ID — see Voices). An unrecognized voice falls back to the model's default, except on gpt-4o-mini-tts, which returns 400 and lists its 13 voices
languagestringNoLanguage code (e.g. hi-IN, ta-IN; sonic-3.6 and the eleven_* models take base codes like en, hi — a regional code is reduced to its base). On the eleven_* models it enforces the language and number reading; eleven_multilingual_v2 reads the language from the text and ignores it, and a code the model does not speak is ignored. bulbul:v3 defaults to en-IN. bulbul:v4-flash covers hi-IN, en-IN, bn-IN, gu-IN, kn-IN, mr-IN, pa-IN, ta-IN and te-IN; ml-IN and od-IN are not available on it and return 400 (use bulbul:v3)
speednumberNoSpeech speed, default 1.0. Must be 0.25–4.0, then each model clamps to its own range: bulbul:v3 and bulbul:v4-flash 0.5–2.0, gpt-4o-mini-tts 0.25–4.0, deepgram-aura-2/-1 0.7–1.5, sonic-3.6 0.6–1.5, gnani-timbre-v3.0 0.85–1.15, mai-voice-2.1 / mai-voice-2.1-flash 0.5–2.0, deepgram-flux-tts 0.5–1.5 (English voices only), eleven_* 0.7–1.2. Ignored by aura-2-en, aura-2-es, melotts
speech_sample_rateintegerNoOutput sample rate in Hz, an integer from 8000 to 48000. Leave it out to get each model's own default: bulbul:v3 and bulbul:v4-flash 22050, sonic-3.6 44100, gnani-timbre-v3.0 48000, deepgram-aura-2 / deepgram-aura-1 24000 (8000 for mulaw / alaw). Headerless pcm carries no rate, so it defaults to 8000 on every model. Send 8000 for phone audio. bulbul:v3 accepts only 8000, 16000, 22050, 24000, 32000, 44100 or 48000 and bulbul:v4-flash only 8000, 16000, 22050 or 24000 (anything else is a 400); Deepgram PCM output snaps to the nearest of 8000, 16000, 24000, 32000 or 48000, and its mp3 / opus / aac output has a fixed rate. The eleven_* models default to 44100 for mp3 (snapping to 22050, 24000 or 44100) and 24000 for pcm / wav (snapping to 8000, 16000, 22050, 24000, 32000, 44100 or 48000); opus is always 48000 and mulaw / alaw always 8000. Ignored by gpt-4o-mini-tts
response_formatstringNoDefault mp3 — see Audio Formats
temperaturenumberNoExpressiveness. bulbul:v3 and bulbul:v4-flash only — higher is more expressive, lower is more consistent. The model's range is 0.01–1.0; values up to 2.0 are accepted and applied as 1.0, above 2.0 is a 422. Ignored by other models. Defaults to 0.9 (warmer than the model's flat default)
instructionsstringNoNatural-language delivery direction — tone, emotion, accent, pacing. gpt-4o-mini-tts only. Max 2000 chars. Example: "Speak slowly and warmly, like you're reassuring someone."
humanizebooleanNoDefault true. Shapes your text for natural speech before synthesis — strips markdown and emoji, speaks URLs and emails as words, groups long digit runs into readable chunks. Set false to synthesize your text byte-for-byte
streambooleanNodeepgram-aura-2, deepgram-aura-1 and deepgram-flux-tts only — stream audio as it's generated (lower time-to-first-byte)

Audio Formats

response_format accepts mp3, opus, aac, flac, wav or pcm, but not every model can produce every format. The Content-Type response header always describes the audio actually returned, so read it rather than assuming the format you asked for.

pcm is headerless 16-bit PCM (audio/pcm; sonic-3.6 and gnani-timbre-v3.0 also accept the name raw), and headerless G.711 is labelled audio/mulaw / audio/alaw. Audio that arrives in a WAV container is labelled audio/wav, as buffered mulaw / alaw from deepgram-aura-* do; use stream: true for headerless G.711.

ModelFormats honouredOtherwise returns
bulbul:v3, bulbul:v4-flashmp3, aac, flac, wav, pcm, when response_format is sentWAV (including for opus, mulaw, alaw, and when response_format is left out)
gpt-4o-mini-ttsmp3, opus, aac, flac, wav, pcmMP3
deepgram-aura-2, deepgram-aura-1mp3, opus, aac, flac, wav, pcm, plus mulaw / alawWAV
deepgram-flux-ttsmp3, opus, aac, flac, wav, pcm, plus mulaw / alaw. With stream: true, only pcm, wav, mulaw and alaw streamWAV
sonic-3.6mp3, wav, pcmWAV
gnani-timbre-v3.0mp3, wav, pcm, opus, plus mulawWAV
mai-voice-2.1, mai-voice-2.1-flashmp3 (default, 24 kHz), wav, pcm (alias raw), opus (alias ogg), webm, mulaw, alawflac and aac return 400
eleven_* (ElevenLabs)mp3, wav, pcm, opus, plus mulaw / alawMP3 (for aac and flac)

Errors

Errors use the OpenAI envelope: {"error": {"message", "type", "code"}}.

StatuscodeWhen
400—The model rejected a parameter (for example an unsupported speech_sample_rate on bulbul:v3)
402insufficient_creditsCredit balance is exhausted
403permission_deniedThe API key does not have the tts permission, or the model is not available on your plan
404model_not_foundmodel is not a known TTS model ID
422invalid_requestMissing or empty input, input over the model's character limit (see input above), or a field with the wrong type or out of range (speed, speech_sample_rate, temperature, instructions)
429quota_exceededPlan usage limit reached
503provider_error, upstream_timeout, upstream_unavailableThe model failed to synthesize. The response includes a request_id

MAI Voice (preview)

mai-voice-2.1 and mai-voice-2.1-flash are Microsoft AI's text-to-speech models. Both are preview. mai-voice-2.1 ($0.2292 per 10K characters) is the most expressive and suits narration and long-form audio. mai-voice-2.1-flash ($0.1563 per 10K characters) is built for low latency and is the pick for live calls.

  • Voices and languages. 97 voices across 23 languages: cs, da, de, en, es, fi, fr, hi, hu, id, it, ko, nb, nl, pl, pt, ro, ru, sv, th, tr, vi, zh. Voice handles are lowercase <locale>-<name> (for example hi-in-kavya) and case-insensitive. Each voice speaks only its own locale. The full list is in voice_names and voice_details on GET /api/v1/models?category=tts, and in Voices.
  • Default voice. With no voice, the first voice for the request language is used (hi gives hi-in-arjun), otherwise en-in-priya.
  • Text. Plain text only. SSML and tags are not supported; the text is read as written.
  • Formats. mp3 (default), wav, pcm, opus, webm, mulaw and alaw; flac and aac return 400. speech_sample_rate snaps to the nearest supported rate: mp3 16000, 24000 or 48000; wav 8000, 16000, 24000 or 48000; pcm 8000, 16000, 22050, 24000, 44100 or 48000; opus 24000 or 48000; webm 24000; mulaw / alaw 8000.
  • Speed. speed is 0.5 to 2.0 and is clamped. Voice agents use tts_speed, 0.5 to 2.0.
  • Voice agents. Set tts_model to either id in a voice agent or voice session.
  • Limits. Up to 4096 characters per request. Not processed in India, so an agent with hosting: "india" cannot use them. They are paid-plan only, are never a default, and cannot be used in tts_fallbacks.
  • Preview. Microsoft ships these models as a public preview with no SLA, and may change or retire them at short notice. If one is retired, its ID keeps working and is answered by a named successor, as described in Retired and deprecated models, so an agent that uses it keeps working but may sound different. Use a generally available model for production-critical agents.
curl -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "mai-voice-2.1-flash", "voice": "hi-in-kavya", "input": "Namaste, aapka order aaj shaam tak pahunch jayega."}' \
  --output speech.mp3

Making speech sound human

Naturalness comes from three places, in order of impact:

1. The text you send. Every engine sounds more human when the input reads like speech rather than like a screen. humanize (on by default) handles the mechanical part — markdown, emoji, https://callmissed.com → "callmissed dot com", 2039123456 → 203.912.3456. Beyond that, write short sentences and use contractions; if an LLM generates your text, tell it that its output will be spoken aloud.

2. Expressiveness parameters, where the model supports them:

# bulbul:v3 — temperature is its expressiveness control
curl -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "bulbul:v3", "input": "Bilkul, main abhi check karta hoon.", "voice": "shubh", "temperature": 1.0}' \
  --output speech.mp3

# gpt-4o-mini-tts — direct the performance in plain language
curl -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o-mini-tts", "input": "Your order shipped this morning.", "voice": "nova", "instructions": "Cheerful and upbeat, like sharing good news with a friend."}' \
  --output speech.mp3

3. Pauses in the text. deepgram-aura-2 and deepgram-aura-1 read pause cues written into your text: ... gives a longer natural pause, a comma or period gives a short one, and um/uh render as natural hesitation.

{"model": "deepgram-aura-2", "input": "Let me pull that up... okay, found it."}

bulbul:v3 does not support pause markup or SSML — it would speak the dots aloud. Use sentence length and real punctuation for rhythm on that model. gnani-timbre-v3.0 takes its own audio tags instead — see below.

Gnani Timbre v3 audio tags

gnani-timbre-v3.0 (Gnani Timbre v3) streams speech in 12 voices, and every voice speaks all 10 Indian languages (hi-IN, en-IN, ta-IN, te-IN, kn-IN, ml-IN, mr-IN, pa-IN, bn-IN, gu-IN) plus auto and Hinglish hi-en. Write expressive tags straight into input:

TagEffect
<laugh>A full laugh
<giggle>A light giggle
<sigh>A sigh
<exhales>An audible exhale
<sniffles>A sniffle
<yawns>A yawn
<coughs>A cough
<clears throat>Clears the throat
<whispers>Hushed delivery
<shouting>Raised, shouted delivery
<excited>Energetic delivery
<slow>Drawn-out delivery
<pauses>A short silence (not spoken)

Rules:

  • Use the exact lowercase names above, in angle brackets. There is no closing tag.
  • A tag applies from its position to the end of the input, or until the next tag.
  • Unknown tags are dropped.
  • SSML is not supported: a <speak> wrapper is read aloud. Square-bracket tags such as [laugh] are not supported either.
curl -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "gnani-timbre-v3.0", "voice": "Shivani", "input": "Let me check that for you. <pauses> Found it <laugh> your order ships tomorrow."}' \
  --output speech.mp3

Voice agents that speak with Gnani Timbre v3 add a few of these tags on their own. See Voice agents.

Six more TTS models (rime-coda, inworld-tts-2, inworld-tts-2-flash, fish-audio-drama-3, gradium-tts-beta, microsoft-neural-tts) speak only inside voice agents and voice sessions. They are not valid model values here and return 400. Their voices, languages and prices are under Voice session voices.

Choosing an expressive voice

WantUse
Most natural conversational speechsonic-3.6 — 44 languages, native-quality Hindi, sub-90ms first audio
Direct the emotion in wordsgpt-4o-mini-tts with instructions
Indian languages, warm deliverybulbul:v3 with temperature 0.9–1.0
Pauses and hesitation in textdeepgram-aura-2 (90 voices, many tagged expressive/cheerful)
Lowest costdeepgram-aura-1 or bulbul:v4-flash
Narration and long-form audio (preview)mai-voice-2.1
Live calls on a Microsoft AI voice (preview)mai-voice-2.1-flash

Streaming (Deepgram)

For deepgram-aura-2, deepgram-aura-1 and deepgram-flux-tts, set "stream": true to receive audio frames as they're synthesized, as a chunked HTTP response. Ideal for real-time playback where you want the first audio bytes as fast as possible.

Streaming supports raw encodings only — response_format must be linear16 (or pcm/wav), mulaw, or alaw. Compressed formats (mp3, opus, aac, flac) cannot be streamed; if you request one with stream:true, the full audio is returned in one buffered response instead.

Streamed audio is headerless and its Content-Type carries the sample rate, for example audio/l16;rate=24000 for linear16 / pcm / wav (Deepgram's label; the samples are 16-bit little-endian, not the network byte order RFC 2586 assumes for L16), or audio/mulaw;rate=8000 / audio/alaw;rate=8000.

curl -N -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepgram-aura-2", "voice": "thalia", "input": "Streaming hello.", "response_format": "linear16", "stream": true}' \
  --output speech.raw

Billing is identical to the non-streaming path (per character). Other providers ignore stream and return the full audio in one response.

Deepgram Flux TTS

deepgram-flux-tts ($0.4688 per 10K characters) is Deepgram's conversational voice model, with 266 voices in 42 languages: 149 generally available voices in 10 languages (including Hindi) and 117 Early Access voices in 32 languages (including Tamil, Telugu, Kannada, Marathi, Gujarati, Bengali and Urdu). Pass the voice as a bare name such as ajay; the voice picks the language. Leave voice out for the default of language (priya for English). An unknown voice returns 400 and does not charge. The full voice list is under Flux TTS voices by language, and GET /v1/models/deepgram-flux-tts returns each voice with its language.

  • Length. input is capped at 2000 characters. Without streaming, a request longer than 400 characters returns 400: whole-clip synthesis is slow on long text, so set "stream": true with pcm, wav, mulaw or alaw for anything longer.
  • Early Access languages read numbers and dates as written. Spell them out in the text.
  • Plain text. Tags and SSML are read aloud.
curl -N -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepgram-flux-tts", "voice": "ajay", "input": "Namaste, aap kaise hain?", "response_format": "pcm", "stream": true}' \
  --output speech.pcm

ElevenLabs

Every current ElevenLabs text-to-speech model is available under its own ElevenLabs model ID, on this endpoint and in voice agents and voice sessions (set it as tts_model). All of them share the same voices: pass a premade name such as sarah (default), george or brian, or any ElevenLabs voice ID (20 characters) from your own ElevenLabs voice library, including cloned voices — see ElevenLabs voices. Paid plans only.

ModelPriceLanguagesBest for
eleven_v4$0.8333 / 10K chars91, including 12 Indian languagesThe most emotive, highest-quality speech; audio tags such as [laughs] are performed
eleven_v4_turbo$0.4167 / 10K chars91, including 12 Indian languagesv4 expressiveness tuned for live calls (~100 ms to first audio upstream)
eleven_v3$0.8333 / 10K chars85, including 11 Indian languagesDramatic, expressive delivery; audio tags; multi-speaker dialogue
eleven_v3_conversational$0.4167 / 10K chars85, including 11 Indian languagesv3 tuned for natural conversational agents (~165 ms upstream)
eleven_multilingual_v2$0.8333 / 10K chars29, including Hindi and TamilLifelike, consistent long-form speech: narration, audiobooks, voice-overs
eleven_flash_v2_5$0.4167 / 10K chars32, including Hindi and TamilFast and affordable (~100 ms upstream); the recommended ElevenLabs voice for calls
eleven_turbo_v2_5$0.4167 / 10K chars32, including Hindi and TamilFunctionally equivalent to eleven_flash_v2_5, which is faster
eleven_flash_v2$0.4167 / 10K charsEnglish onlyUltra-low-latency English (~135 ms upstream)
eleven_turbo_v2$0.4167 / 10K charsEnglish onlyFunctionally equivalent to eleven_flash_v2, which is faster
  • Language. Send a base code as language (hi, ta; hi-IN is reduced to hi). On every model except eleven_multilingual_v2 it enforces the language and how numbers and dates are read; eleven_multilingual_v2 reads the language from the text. A code the model does not speak is ignored rather than refused.
  • Speed. speed clamps to 0.7–1.2.
  • Formats. mp3 (default), wav, pcm, opus, mulaw and alaw; aac and flac return MP3. See speech_sample_rate above for the rates each format takes.
  • Audio tags. eleven_v4, eleven_v4_turbo, eleven_v3 and eleven_v3_conversational perform bracketed tags written into the text, such as [laughs], [sighs], [whispers], [curious] or [short pause], placed right before the words they shape. The other models read them aloud.
  • Pauses. eleven_flash_v2_5, eleven_turbo_v2_5, eleven_multilingual_v2, eleven_flash_v2 and eleven_turbo_v2 hold a real silence for <break time="1.5s" /> (up to 3 seconds; many breaks in one input can make the voice unstable). The v3 and v4 models ignore it, so use [short pause] there. An ellipsis (...) adds a shorter pause on every model. No other SSML is supported.
  • Length. input takes the endpoint's 4096 characters on every model.
  • Streaming. stream is ignored; the full audio is returned in one response.
curl -X POST https://api.callmissed.com/v1/audio/speech \
  -H "Authorization: Bearer cm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"model": "eleven_flash_v2_5", "voice": "sarah", "language": "hi", "input": "नमस्ते, मैं आपकी कैसे मदद कर सकती हूँ?"}' \
  --output speech.mp3

On this page