Views
No views yet

31/12/2025 and ZeroTTS without text normalizer.pip install zerotts1from zerotts import ZeroTTS
2
3tts = ZeroTTS.from_pretrained("zeroweight-ai/ZeroTTS")
4audio = tts.synthesize("Xin chào các bạn, mình là ZeroTTS.", voice="maichi")
5tts.save_audio(audio, "out.wav")1import queue
2
3import numpy as np
4import sounddevice as sd # pip install sounddevice
5
6TEXT = ("Đây là chế độ phát trực tuyến. Âm thanh được tạo ra và phát ngay lập tức, "
7 "không cần chờ toàn bộ đoạn văn hoàn thành. Nhờ vậy, người nghe chỉ mất "
8 "khoảng 70 mili giây là đã nghe thấy câu đầu tiên, ngay cả khi mô "
9 "hình đang chạy trên CPU của một chiếc laptop bình thường.")
10
11pending, tail = queue.Queue(), np.zeros(0, dtype="float32")
12
13def feed(outdata, frames, _time, _status):
14 global tail
15 while len(tail) < frames and not pending.empty():
16 tail = np.concatenate([tail, pending.get_nowait()])
17 n = min(frames, len(tail))
18 outdata[:n, 0] = tail[:n]
19 outdata[n:] = 0
20 tail = tail[n:]
21
22with sd.OutputStream(samplerate=tts.sample_rate, channels=1,
23 dtype="float32", callback=feed):
24 for chunk in tts.synthesize_stream(TEXT, voice="maichi"):
25 pending.put(chunk.reshape(-1)) # chunk is (1, n) float32 at 48 kHz
26 while not pending.empty() or len(tail):
27 sd.sleep(50) # let the buffer drain before closing| ZeroTTS | OmniVoice | XTTS-v2-vietnamse | viXTTS | |
|---|---|---|---|---|
| WER ↓ | 1.03 % | 4.13 % | 16.42 % | 18.40 % |
| Naturalness (UTMOS) ↑ | 2.91 | 2.76 | 2.43 | 2.35 |
| Voice similarity (SSIM) ↑ | 0.936 | 0.950 | 0.940 | 0.935 |
| Dead air (excess silence) ↓ | 0.029 s | 0.340 s | 0.532 s | 0.233 s |
| RTF, CPU ↓ | 0.50× | 6.12× | 0.71× | 0.73× |
| Time to first audio, CPU ↓ | ~70 ms | ~34 s | ~6.1 s | ~5.1 s |
| Parameters ↓ | 202 M | 775 M | 467 M | 467 M |
| ZeroTTS | OmniVoice | XTTS-v2-vietnamse | viXTTS | |
|---|---|---|---|---|
| RTF — short | 0.51× | 10.87× | 0.70× | 0.71× |
| RTF — medium | 0.47× | 4.82× | 0.70× | 0.70× |
| RTF — long | 0.53× | 2.67× | 0.71× | 0.78× |
| TTFA — short | 53 ms | 21.7 s | 4.02 s | 2.45 s |
| TTFA — medium | 66 ms | 28.9 s | 4.02 s | 3.72 s |
| TTFA — long | 89 ms | 52.3 s | 10.3 s | 9.22 s |
(1, n_voice_queries, d_model),
shipped as a .npz under voices/. That array is the entire speaker
conditioning — no reference transcript, no audio prompt.Voice cloning is not available in this release. Those latents come from a voice encoder that reads a reference clip, and that encoder is not published. This repository ships ready-to-use voices; it cannot create new ones from audio.To get latents for your own speaker, see zeroweight.ai or get in touch.
voices/<name>/voice.npz and work with no code change.code_switch), but it is not an English TTS system and is not evaluated as one.onnx/codec/ so ZeroTTS has
no external runtime dependency; the encoder is not included. See
onnx/codec/LICENSE-Apache-2.0.txt.1@misc{gong2026mossaudiotokenizerscalingaudiotokenizers,
2 title={MOSS-Audio-Tokenizer: Scaling Audio Tokenizers for Future Audio Foundation Models},
3 author={Yitian Gong and Kuangwei Chen and Zhaoye Fei and Xiaogui Yang and Ke Chen
4 and Yang Wang and Kexin Huang and Mingshu Chen and Ruixiao Li
5 and Qingyuan Cheng and Shimin Li and Xipeng Qiu},
6 year={2026}, eprint={2602.10934}, archivePrefix={arXiv}, primaryClass={cs.SD}
7}