Stream Speech
Synthesize speech and stream the audio back as it is generated, for low-latency playback. Set output_format in the body for explicit codec/sample-rate/bitrate control (e.g. pcm_16000 or ulaw_8000 for telephony), or fall back to the Accept header for the container; the response is raw audio bytes (HTTP chunked). For Base64-encoded audio with speech-mark metadata in a single JSON response, use POST /v1/audio/speech.
Request
- Base URL: https://api.speechify.ai
- URL: https://api.speechify.ai/v1/audio/stream
- Auth: HTTP bearer
Headers
Selects the audio container/codec for the streamed response when output_format is not set in the request body. The response Content-Type echoes this value, except audio/pcm returns audio/L16 with rate and channels parameters (raw 16-bit linear PCM, 24 kHz mono, little-endian). For explicit sample-rate/bitrate control (e.g. pcm_16000, ulaw_8000), set output_format in the body instead; it takes precedence over this header.
Request body
Response
Streamed audio. When output_format is set it selects the codec/sample rate; otherwise the Accept header does. The Content-Type reflects the selected format: it matches the Accept header, except raw PCM returns audio/L16 (with rate and channels parameters) and u-law returns audio/basic. A content policy refusal that lands after the audio has started aborts the transfer, so the client raises instead of completing the body; only a completed transfer was served in full.
Changes
No recorded changes to this operation across all 1 revision of this API.