MOSS-TTS-Nano
MOSS-TTS-Nano copied to clipboard
Feature request: true streaming audio output for low-latency ONNX CPU inference
Summary
The current ONNX runtime streaming mode in onnx_tts_runtime.py is not a true streaming implementation: the synthesizer only provides the final audio waveform after all synthesis is completed. This limits real-time use cases (e.g. low-latency playback on CPU), since intermediate audio chunks are not yielded or made available while they are decoded.
Motivation
- Real-time playback: For responsive TTS applications on CPU (or any platform without fast GPU), it is essential to reduce latency and allow playback to begin as soon as some audio audio samples are available.
- Integrating with audio pipelines: Being able to stream decoded audio in small chunks (e.g. via a callback or Python generator/yield API) would allow better integration with real-time processing and audio output libraries (e.g.
sounddevice, web streaming, etc.). - User experience: This would greatly improve responsiveness for long texts or slower hardware.
Hello, please take a look at app_onnx.py.