MOSS-TTS-Nano icon indicating copy to clipboard operation
MOSS-TTS-Nano copied to clipboard

Feature request: true streaming audio output for low-latency ONNX CPU inference

Open GergelyZsolt opened this issue 7 months ago • 1 comments

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.

GergelyZsolt avatar Apr 30 '26 20:04 GergelyZsolt

Hello, please take a look at app_onnx.py.

alpacaking avatar May 01 '26 16:05 alpacaking