Skip to main content

One-shot speech

speech.create returns the whole clip in one response, for up to 10,000 characters of text.
Identical requests are served from a cache at no charge. Speech is billed per character of text. Every parameter is described in Synthesize parameters.

Streaming speech

speech.stream sends audio as it is generated, so playback can start before the whole clip is ready. Chunks are raw PCM (s16le, 24 kHz, mono) unless you set output_format.
To collect everything instead, call readAll(). Errors before the stream starts are the usual errors (for example PaymentRequiredError). A failure after it starts is a StreamError.

Audio formats

All audio is mono. The engine’s native rate is 24 kHz. You can ask for a higher sample_rate, but lower ones still come back at 24 kHz, so always read the actual rate from the response: the audio’s or stream’s sample rate, or the realtime task_started event.