Streaming Support for OpenAI Endpoint
Hello,
Could you also support streaming responses for the provided openAI endpoint? That would be AMAZING!
This model doesn’t do “real streaming” TTS: it has to finish generating the full audio for the request before it can return audio to the client, so the client receives it all at once rather than hearing it as it’s being generated.
What you’re asking for is Kyutai-style bi-directional streaming. You can keep sending text incrementally and the TTS starts emitting audio incrementally without waiting for the full text upfront.
Also, OpenAI TTS API is fundamentally request/response. You send the text and you get audio back. It does not provide a protocol for continuing to feed additional text while audio is already being produced.
Here are the open-weights models that claim that capability. Kyutai is confirmed, and the others should be validated:
Streaming candidates list:
- Kyutai TTS: confirmed true streaming behavior
- VibeVoice-Realtime: claims streaming text input and low-latency output.
- CosyVoice 3.0: claims “bi-streaming” with very low first-packet latency.
- Dia2: claims input streaming/token-based low-latency for LLM pipelines.
- Mini-Omni2: multimodal model; may stream audio output
This model doesn’t do “real streaming” TTS: it has to finish generating the full audio for the request before it can return audio to the client, so the client receives it all at once rather than hearing it as it’s being generated.
What you’re asking for is Kyutai-style bi-directional streaming. You can keep sending text incrementally and the TTS starts emitting audio incrementally without waiting for the full text upfront.
Also, OpenAI TTS API is fundamentally request/response. You send the text and you get audio back. It does not provide a protocol for continuing to feed additional text while audio is already being produced.
Here are the open-weights models that claim that capability. Kyutai is confirmed, and the others should be validated:
Streaming candidates list:
* Kyutai TTS: confirmed true streaming behavior * VibeVoice-Realtime: claims streaming text input and low-latency output. * CosyVoice 3.0: claims “bi-streaming” with very low first-packet latency. * Dia2: claims input streaming/token-based low-latency for LLM pipelines. * Mini-Omni2: multimodal model; may stream audio output
Apologies for the confusion, I meant just streaming the audio as its being generated. travisvn's project supports that (basic audio streaming/SSE/real time playback - https://github.com/travisvn/chatterbox-tts-api#quick-start-1) without issue
Thank you for the clarification. After investigating the issue, I understand that instead of merging all chunks together and then sending the final audio to the client, the other project streams individual chunks to the client, which handles the playback and merging.
You can reproduce this behavior by using the /tts endpoint in server.py directly, rather than relying on the Web UI. With this approach, you'll send chunks of text and receive audio chunks in return. The client is then responsible for handling playback, merging, post-processing, and other downstream tasks.
I think the request was for similar streaming in the OpenAI endpoint (/api/v1/audio/speech) to be able to use this with e.g. Open Web UI
I need the OpenAI endpoint to also support it as well for streaming to home assistant (such as with https://github.com/sfortis/openai_tts or https://github.com/roryeckel/wyoming_openai)
Any update on this, id prefer to use your repo over travisvn (https://github.com/travisvn/chatterbox-tts-api#-real-time-audio-streaming)