POST /v1/audio/speech reads text aloud and returns the audio in the response
body. The model is nur-v1.
ev_d116d96b is Nur’s voice. List the others with
GET /v1/voices, or clone your own.
Parameters
Languages and accents
Write the text in the language you want. For Arabic,language also picks the
dialect’s pronunciation: ar is Modern Standard Arabic, and dialect codes such
as arz (Egyptian), ars (Najdi), afb (Gulf), apc (Levantine) and ary
(Moroccan) speak with that region’s accent.
A cloned voice speaks every language, and keeps a hint of the accent it was
recorded in. Record the clip in the language you will use most.
Stream audio as it is made
For low latency, ask for PCM over server-sent events. Eachspeech.audio.delta event carries base64 PCM (16-bit, 24 kHz, mono) for the
next phrase, and speech.audio.done ends the stream.
Long text
A chapter or an article can go in one request:input takes up to 30,000
characters. Long text takes a few minutes to make, and the file arrives once
all of it is made, so give the request a timeout of a few minutes. To hear it
as it is made, ask for pcm with stream_format: "sse". Longer than that,
split at paragraph or sentence boundaries and request each part with the same
voice: every request with a voice id produces the same speaker, so the parts
join cleanly.
Errors
Every response carries
X-Synthetic-Audio, which declares the audio
machine-generated.