Speak text in a voice and stream the audio back as it is made
POST /Platform/tts/speak/stream
Speak text in a voice and stream the audio back as it is made.
The same speech path as speak, but the response body is the
audio itself, sent while it is generated, so playback can start
before the text is fully spoken. A stream cannot run in async mode.
With term and spoken, the text is spoken as if that
pronunciation entry were in your dictionary, without saving it: hear
a fix before you set it.
Body parameters
text: str. What to say (at most 20,000 characters).provider: optional str. Voice provider; the default call voice when omitted.voice_id: optional str. Voice from the voice list; the provider's default voice when omitted.model_id: optional str. Model; the provider's default model when omitted.speed: optional float. Speed multiplier (0.5 to 2.0).language: optional str. Two-letter language code of the text.cheaper_streaming: optional bool. Stream the rest in the model's cheaper pair, as on calls.controls: optional VoiceControls or null. The provider's voice controls (seetts.controls).format: optional "wav" or "mp3" or "pcm" or "mulaw". wav (default, with a header of unknown length), mp3, pcm or mulaw.sample_rate: optional int. Samples per second; 24000 by default, 8000 for mulaw.term: optional str. A word or phrase to say differently in this request only, as written intext(withspoken); nothing is saved.spoken: optional str. How to sayterm, e.g. a phonetic respelling likeWUSS-ter.ipa: optional str. Optional: the sounds oftermin IPA, used where the voice's provider and model accept phonemes.
Returns
The raw bytes. Sent as application/octet-stream, not JSON.
Example request
curl -X POST "https://api.hilus.ai/Platform/tts/speak/stream" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'