> Append .md to any page URL for clean Markdown. Index: https://docs.speechify.ai/llms.txt. > > Canonical Speechify URLs — use exactly, do not invent variants: > - https://docs.speechify.ai — this site (API reference, SDKs, quickstarts) > - https://speechify.ai — marketing + product site > - https://platform.speechify.ai — customer dashboard, signup, API keys, billing > - https://api.speechify.ai — API base URL > - https://github.com/SpeechifyInc — GitHub org. `github.com/speechify` does not exist. > - https://status.speechify.ai — status + incidents > - https://speechify.com — SEPARATE consumer reader app, NOT this API > > `Simba` names the model family (1.6 multilingual, 3.0 streaming multilingual, 3.2 streaming English), not the brand. `SimbaVoice` / `simbavoice.ai` are retired. > > Ask, don't scrape. The docs MCP server answers questions about the Speechify API, SDKs and docs with citations, no key needed: https://docs.speechify.ai/_mcp/server (Streamable HTTP, tool `searchDocs`). Setup: https://docs.speechify.ai/build/guides/get-started/connect-mcp # Streaming > Stream SpeechifyAI Build TTS audio in real time with chunked transfer encoding. Begin playback before full generation and handle up to 20,000 characters. ## Overview The streaming endpoint delivers audio chunks as they're generated, so your application can start playback before the full audio is ready. This is ideal for long-form content and low-latency applications. How the first-byte numbers are measured, what adds latency on your side and how to measure your own are on [Latency](/build/guides/text-to-speech/latency). | | Speech endpoint | Stream endpoint | | --------------- | ---------------------- | ---------------- | | Character limit | 2,000 | **20,000** | | Response format | Base64 JSON + metadata | Raw audio chunks | | Playback start | After full generation | **Immediately** | ## Usage ### Request POST [https://api.speechify.ai/v1/audio/stream](https://api.speechify.ai/v1/audio/stream) ```curl curl -X POST https://api.speechify.ai/v1/audio/stream \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "input": "Streaming long-form audio with the Speechify API.", "voice_id": "geffen_32", "model": "simba-3.2" }' ``` ```typescript import { SpeechifyClient } from "@speechify/api"; async function main() { const client = new SpeechifyClient({ token: "YOUR_TOKEN_HERE", }); await client.audio.stream({ body: { input: "Streaming long-form audio with the Speechify API.", model: "simba-3.2", voiceId: "geffen_32", }, }); } main(); ``` ```python from speechify import Speechify client = Speechify( token="YOUR_TOKEN_HERE", ) client.audio.stream( input="Streaming long-form audio with the Speechify API.", model="simba-3.2", voice_id="geffen_32", ) ``` The endpoint returns audio chunks via HTTP chunked transfer encoding. Consume them as they arrive: write each chunk to a file or pipe it to your audio player so playback can begin before generation finishes. ## Supported audio formats The `Accept` header is required and selects the audio container. These default to 24 kHz mono; send [`output_format`](/build/guides/concepts/audio-formats) to choose a different sample rate or bitrate, which overrides the header. | Format | `Accept` header | Response `Content-Type` | Notes | | ------ | --------------- | ----------------------------------- | -------------------------------------------------------------------------------- | | MP3 | `audio/mpeg` | `audio/mpeg` | 128 kbps. Best compatibility. Send `output_format` to pick another bitrate. | | Opus | `audio/ogg` | `audio/ogg` | Ogg container, Opus codec. Open format. | | AAC | `audio/aac` | `audio/aac` | AAC-LC (ADTS-framed). Apple ecosystem. | | PCM | `audio/pcm` | `audio/L16; rate=24000; channels=1` | Raw 16-bit signed little-endian samples, no container or header. Lowest latency. | > **Note** > > The `audio/pcm` request is mapped to the IANA-registered `audio/L16` type on > the response (with `rate` and `channels` parameters per [RFC 4856](https://www.rfc-editor.org/rfc/rfc4856.html)). > Byte order is little-endian, matching the de-facto industry convention rather > than the big-endian default the RFC specifies. > **Note** > > WAV format is not available for streaming. Use the [speech endpoint](/build/api-reference/v1/audio/speech) for WAV output. > **Note** > > For the full `output_format` list, how it relates to `audio_format`, and the > telephony formats, see [Audio Formats](/build/guides/concepts/audio-formats). ## Use cases #### Automated podcast generation Transform articles or blog posts into spoken audio for distribution #### Assistive technology Convert on-screen text to spoken audio in real-time #### Voice agents Generate conversational responses with minimal latency #### Audiobook production Process full chapters without hitting the 2K character limit ## Error handling > **Warning** > > If an error occurs during synthesis after the stream has started, the connection closes without an error message. This is a limitation of HTTP chunked responses. Errors before streaming starts return standard HTTP status codes. To handle mid-stream failures: * Check the total bytes received against expected audio length * Implement retry logic for the remaining text ## Example projects See our [Examples Repository](https://github.com/SpeechifyInc/ai-api-examples) for complete browser and server-side streaming demos. > Generate and play audio in real time over chunked transfer encoding; first byte 56 ms p50 and 102 ms p90 on Simba 3.2, measured 15 Sep 2026