Skip to main content
Send text and a voice, get the complete audio back in the reply. Choose raw PCM, WAV, MP3, or 8 kHz μ-law and A-law for phone calls.
Batch turns text into a complete audio file in one request. For audio that starts playing while you are still sending text, use realtime.

Synthesize Speech

Convert text to speech and return the audio in the response body.

Arguments

Send a JSON body (Content-Type: application/json). Leave out a field instead of sending null: a null returns 422.
string
required
A voice from List voices.
string
required
Text to speak. Up to 5,000 characters.
string
default:"auto"
auto, en-US, en-GB, en-IN, en-AU, hi, bn, ta, te, mr, gu or kn. The voice must speak it, or the request returns 400 language_not_supported. There is no plain en.
object
Audio format. Default: raw pcm_s16le at 24000 Hz. See Output format.
number
default:"1.0"
Speaking speed, 0.7 to 1.2.
number
default:"1.0"
Loudness, 0.5 to 2.0.
array
Up to 100 inline rules: {"word", "value", "kind"}. kind is ipa, arpa or respell. See Pronunciation.
string
A saved lexicon to apply.
boolean
Send false, with seed, for repeatable audio.
integer
With continuation: false, the same input and seed give identical audio.

Output format

string
default:"raw"
raw, wav or mp3.
string
default:"pcm_s16le"
pcm_s16le, pcm_mulaw, pcm_alaw, or mp3 for the MP3 container.
integer
default:"24000"
Sample rate in Hz.
integer
MP3 only, and required for MP3. Bits per second, for example 128000.

Response

Returns 200 with the audio as the body. Content-Type is application/octet-stream (raw), audio/wav or audio/mpeg. On error, returns a JSON body. See Errors.