Stream speech
POST /v1/speech/stream — audio that starts arriving before synthesis finishes.
POST
Streaming sends audio as it is produced rather than after it is complete. On a live call this is the difference between a natural pause and dead air.
One endpoint returns two shapes, chosen by the
Accept header:
text/event-stream→ Server-Sent Events with base64 chunks and a usage event- anything else → raw audio bytes, chunked as they arrive
Constraints
Time to first audio
Measured on the deploy host, one Arabic sentence:
The gap widens with length: streaming time-to-first-audio stays roughly flat, while a complete response scales with how much was asked for.
Body
string
required
Text to speak. Maximum 5,000 characters.
string
required
Voice ID.
string
default:"sada-1"
Must be
sada-1.string
default:"opus"
opus, mulaw, or pcm.SSE events
event
Sent once, before any audio. Carries
voice, model, format, sample_rate, content_type.event
Repeated. Carries
index (0-based) and audio (base64). Concatenate in index order.event
Sent once at the end. Carries
bytes, characters, cost_cents.event
Sent instead of
done if synthesis fails mid-stream. Carries error.code and error.message.Failure mid-stream
The two shapes fail differently, because once the status line is sent there is no way to change it.- SSE emits an
errorevent and closes. Handle it explicitly — a stream that ends withoutdonedid not succeed. - Raw aborts the response body. Appending an error would be decoded as audio, so the connection breaking is the signal. Treat a truncated body as a failure.
Billing happens after the stream drains. A synthesis that dies partway is not charged.
Authorizations
API token from the Voho console. Begins with voho_sk_live_.
Body
application/json
Response
SSE event stream, or raw chunked audio.
The response is of type string.

