OpenVoiceOS/phoonnx-spark-tts
Spark-TTS 0.5B — ONNX for phoonnx
ONNX weights for Spark-TTS 0.5B (SparkAudio), packaged for the phoonnx sparktts engine.
Spark-TTS is a decoder-only language model on a Qwen2.5-0.5B backbone. It does not predict audio. It predicts BiCodec tokens, and BiCodec turns those tokens into a waveform. BiCodec keeps two streams: 32 global tokens that carry the speaker, and one semantic stream at 50 Hz that carries what is said. The language model reads the text and the 32 global tokens, then writes the semantic stream.
Files
The short-time Fourier transform in front of the speaker encoder is not in the graphs. ONNX has no complex dtype, so neither torch exporter can lower torch.stft. The mel filterbank projection is inside speaker_encoder_tokenizer.onnx; a caller only has to supply the magnitude spectrogram of torchaudio.transforms.Spectrogram(n_fft=1024, win_length=640, hop_length=320, power=1).
Provenance
model.onnxis mirrored from Fhrozen/Spark-TTS-0.5B-ONNX, verified against the SparkAudio torch weights (below).- the four BiCodec / wav2vec2 graphs were exported from SparkAudio/Spark-TTS-0.5B with opset 17.
- the preset voices were minted with Spark-TTS controllable-TTS mode (gender, moderate pitch, moderate speed) and then frozen, so each voice is stable across calls.
Verified against the torch model
The quantized language models published upstream (model_q4, model_q4f16, model_int8) are not mirrored here. They diverge from the torch model by tens of logits and disagree with greedy decoding, so they are not safe defaults.
License and attribution
Spark-TTS 0.5B is released by SparkAudio under CC-BY-NC-SA-4.0; the upstream code is Apache-2.0. This repository redistributes converted weights under the same terms and adds no license of its own. Cite the original work:
Spark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens — SparkAudio. https://github.com/SparkAudio/Spark-TTS
