Skip to main content
The speed request parameter adjusts playback rate using pitch-preserving time-stretching, so the voice stays natural at any rate. It applies uniformly to all audio in the request, except inside <prosody rate> spans, which override it. Values outside 0.8–1.2 are rejected (400 on REST or a validation error frame on WebSocket). Choose a value inside the range.

Per-span speed with prosody rate

To change speed for part of a request, wrap that text in an SSML-style <prosody rate="..."> tag:
The text inside the span is synthesized at the span’s rate; everything outside keeps the request’s global speed. Rules:
  • Inside a span, rate overrides the global speed; outside, speed applies. Numeric span rates outside 0.8–1.2 are clamped to the nearest endpoint; unlike span rates, an out-of-range global speed is rejected.
  • Spans can cover anything from a few words to multiple sentences, and <break> tags keep working inside them.
  • Spans cannot be nested, and rate is the only supported attribute (pitch / volume are rejected).
  • A span must not start or end inside a <spell> block: put the whole spell tag inside the span or outside it. A span boundary inside a spell block returns a 400.
  • Malformed tags fail loudly: an unclosed <prosody>, an unknown rate, or a stray </prosody> returns a 400 (REST) or an error frame (WebSocket) instead of being silently ignored.
  • On the streaming endpoints, a span must open and close within a single message.
For phone numbers and codes, combining a slow span with digit spacing (<prosody rate="slow">0 30 12 34 56 78</prosody>) or <spell group="2"> reads most naturally.

Next steps

Breaks

Explicit pauses of a set length

Spell tags

Paced, character-by-character codes

Generate speech

All generation parameters in context

Streaming

Prosody spans in streamed text
Last modified on September 25, 2026