WS wss://app.voho.ai/v1/speech/ws
The case neither SSE nor chunked HTTP serves: text arriving incrementally while audio flows back on the same connection. This is what you want when an LLM is emitting tokens into a live call — you start speaking the first sentence while the model is still writing the second. Audio begins before you have finished sending text. It is genuinely pipelined, not batched at the end.

Protocol

Authenticate with your token, then drive the session with JSON text frames. Audio returns as binary frames.

Client to server

frame
Opens synthesis. { "type": "start", "voice": "layla", "model": "sada-1", "format": "opus" }model and format are optional.
frame
Appends text to the utterance. Repeatable — send as many as you like as your source produces them. { "type": "text", "text": "أهلاً " }
frame
Signals no more text is coming and the utterance should finish. { "type": "flush" }

Server to client

frame
Authenticated, waiting for start.
frame
Synthesis is open. Audio frames follow.
frame
Audio in the negotiated format. Concatenate in arrival order.
frame
Utterance complete. Carries bytes, characters, cost_cents.
frame
Carries error.code and error.message.

Constraints

Same as streaming: sada-1 only, formats opus, mulaw, or pcm, and 5,000 characters per utterance.

When to use which

/v1/speech

Text is known up front and you want a file. Simplest.

/v1/speech/stream

Text is known up front but playback should start immediately.

/v1/speech/ws

Text is still being produced while audio plays.
If your text comes from an LLM, use the WebSocket. Waiting for the model to finish before synthesising adds its entire generation time to the silence the caller hears.