Update README
#13
by zeroweightai - opened
Files changed (14)
- .gitattributes+1
- .gitignoreAdded+1
- README.md+61-9
- voices/thanhtruc/preview.wav → samples/conversation.mp3Renamed+2-2
- voices/thanhtruc/voice.npz → samples/cross-lingual-english.mp3Renamed+2-2
- voices/thanhtruc/voice.bin → samples/cross-lingual-reference-vi.mp3Renamed+2-2
- samples/news-code-switch.mp3Added+3
- samples/storytelling.mp3Added+3
- voices/hamy/preview.wav+2-2
- voices/hamy/voice.bin+1-1
- voices/hamy/voice.npz+1-1
- voices/index.json+1-21
- voices/maichi/preview.wav+2-2
- voices/thanhtruc/meta.jsonDeleted-15
3 unmodified lines456783 unmodified lines*.npz filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.wav filter=lfs diff=lfs merge=lfs -text*.mp3 filter=lfs diff=lfs merge=lfs -textbanner.png filter=lfs diff=lfs merge=lfs -text1*.DS_Store95 unmodified lines96979899100991001011021033 unmodified lines1071081091101101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411429 unmodified lines15215315415515615715815916016116216316416516616716816917017117217317417517617713013117817918018118218318411 unmodified lines19619719814919920015115215320120220320420520620720895 unmodified lines
### Vietnamese Zero-Shot Text-to-Speech (TTS) with real-time streaming and voice cloning from seconds of audio. Fast, natural, and optimised for CPU inference.
**The most accurate open Vietnamese TTS we know of — 13× fewer word errors thanthe next open model**, and it runs faster than real time on a laptop CPU.**The most accurate open Vietnamese TTS we know of — 4× fewer word errors thanthe next best model**, and it runs faster than real time on a laptop CPU.
* 🎯 **Ultra-natural** — 2.91 UTMOS, ~0.5 MOS above every other open Vietnamese system, with near-zero dead air (0.029 s vs 0.23–0.53 s).3 unmodified lines* ⚡ **Real-time on CPU, streaming** — ~2× faster than real time (RTF 0.5×), first audio chunk in ~70 ms. No GPU required.* 🇻🇳 **Built for Vietnamese** — tones, code-switched English, and a built-in normalizer that reads `31/12/2025` and `1.250 tỷ` the way a person would. normalizer that reads `31/12/2025` and `ZeroTTS` the way a person would.
* Code, examples, browser demo: **https://github.com/zeroweight-ai/ZeroTTS*** Benchmark dataset: **https://huggingface.co/datasets/zeroweight-ai/ZeroBench-TTS**
## Samples
**Two-speaker conversation**
<audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/conversation.mp3" type="audio/mpeg"></audio>
**Long-form narration**
<audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/storytelling.mp3" type="audio/mpeg"></audio>
**News read, code-switched English**
<audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/news-code-switch.mp3" type="audio/mpeg"></audio>
**Cross-lingual**
Reference audio (Vietnamese)
<audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/cross-lingual-reference-vi.mp3" type="audio/mpeg"></audio>
Output (English)
<audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/cross-lingual-english.mp3" type="audio/mpeg"></audio>
## Usage```pythonpip install zerotts```9 unmodified linesStreaming, with first audio in roughly 70 ms:
```pythonimport queue
import numpy as npimport sounddevice as sd # pip install sounddevice
TEXT = ("Đây là chế độ phát trực tuyến. Âm thanh được tạo ra và phát ngay lập tức, " "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 " "khoảng 70 mili giây là đã nghe thấy câu đầu tiên, ngay cả khi mô " "hình đang chạy trên CPU của một chiếc laptop bình thường.")
pending, tail = queue.Queue(), np.zeros(0, dtype="float32")
def feed(outdata, frames, _time, _status): global tail while len(tail) < frames and not pending.empty(): tail = np.concatenate([tail, pending.get_nowait()]) n = min(frames, len(tail)) outdata[:n, 0] = tail[:n] outdata[n:] = 0 tail = tail[n:]
with sd.OutputStream(samplerate=tts.sample_rate, channels=1, dtype="float32", callback=feed):for chunk in tts.synthesize_stream("Một đoạn văn bản dài hơn…", voice="maichi"): play(chunk) # (1, n) float32 at 48 kHz for chunk in tts.synthesize_stream(TEXT, voice="maichi"): pending.put(chunk.reshape(-1)) # chunk is (1, n) float32 at 48 kHz while not pending.empty() or len(tail): sd.sleep(50) # let the buffer drain before closing```
## Benchmarks11 unmodified lines| **Dead air** (excess silence) ↓ | **0.029 s** | 0.386 s | 0.568 s | 0.215 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 || Size | **81 M**, CPU | 3.1 GB, GPU | 1.9 GB, GPU | 1.9 GB, GPU || Size | **202 M** params, 0.86 GB fp32, CPU | 3.1 GB, GPU | 1.9 GB, GPU | 1.9 GB, GPU |
**4× fewer word errors than the next-best system**, and the only one of the fourthat's actually fast on CPU — the others are sized and tuned for a GPU, and itshows.**4× fewer word errors than the next-best system**, and the fastest of the fouron CPU. The gap is much wider in latency than in throughput: the two XTTSfine-tunes also beat real time (0.71×) but need seconds to emit their firstsample, while OmniVoice is 6× *slower* than real time. All three are sized andtuned for a GPU, and it shows.
Full comparison tables, per-subset breakdowns, and CPU speed methodology:**[docs/BENCHMARKS.md](https://github.com/zeroweight-ai/ZeroTTS/blob/main/docs/BENCHMARKS.md)**12323version https://git-lfs.github.com/spec/v1oid sha256:97e3120194132cd37ae79d6362aaa06cfc9bd971ec59e258be4f183bacbea5b6size 599084oid sha256:ac110a35c09efbdfd91354c53330df511d9eaf9faf21a378c94fc4f15f1efc34size 18858812323version https://git-lfs.github.com/spec/v1oid sha256:e4103e4f3aaee2396bc2a1c986e2db1a2ae62b227ed0f1bcc2f1a9e4ef4d8ed1size 31262oid sha256:3a318f85ed126ab59f17f22ac76552a42c5240f5c445270892630513a2db62c7size 26346812323version https://git-lfs.github.com/spec/v1oid sha256:9d443df8e986d5b08afe934c77764eaa76c326864407c2d6f96cbb09120acef5size 30720oid sha256:1b019bb424b186aaf26c721eb2a7ed68eeb3ca9cff8f3c3fe062151fbaaea003size 34220123version https://git-lfs.github.com/spec/v1oid sha256:be58f3701e6169d33ee23502b0b4674be269f03c6ae113035b671a3d20f9783asize 544172123version https://git-lfs.github.com/spec/v1oid sha256:f0ab526814b46d0bd6c9fdf1026338dc84089cf7e7d9da5552d334ba972d7775size 97156412323version https://git-lfs.github.com/spec/v1oid sha256:6aab12b5fa3d00b5e5dffe826b30fc7c7062c9e3da403d39831dab693d1f3f0dsize 529964oid sha256:4bc33835023d7786bc75cb6c5c2681b1aec1ca3fb01300044b30d2161b29a171size 4608441223version https://git-lfs.github.com/spec/v1oid sha256:a385bc5fc73bc11ebc7cbde39c447ed1b476cb9970c293bd4e26ff66fd11119doid sha256:e137f9544c20c491b3d139aeebb1d8549f8bd6f84f035a2df78830d3baec025dsize 307201223version https://git-lfs.github.com/spec/v1oid sha256:b922963b868a0e403690194782b57f2a11aec55f59e0314566cb80bba71b332boid sha256:a864c127386f74976154c840875f6ad615d74c377768bc6edcb75e3278f228b7size 31262158 unmodified lines159160161162163164165166167168169170171172173174175176177178179180181162163184164158 unmodified lines 10, 768 ] }, { "name": "thanhtruc", "display_name": "Thanh Trúc", "language": "vi", "gender": "nữ", "description": "nữ, trẻ, dịu dàng, thủ thỉ, nhẹ", "tags": [ "nữ", "trẻ", "dịu dàng", "thủ thỉ", "nhẹ" ], "n_voice_queries": 10, "shape": [ 1, 10, 768 ] } ]}}12323version https://git-lfs.github.com/spec/v1oid sha256:a2b2c3fc41b652477139fc0b63bc35399e6d0d07b55470be4603e8024a64f4bfsize 606764oid sha256:987b84f2287607d58d08b4979f0bf5387a8235bc2eff28263065de34481caa67size 491564123456789101112131415{ "name": "thanhtruc", "display_name": "Thanh Trúc", "language": "vi", "gender": "nữ", "description": "nữ, trẻ, dịu dàng, thủ thỉ, nhẹ", "tags": [ "nữ", "trẻ", "dịu dàng", "thủ thỉ", "nhẹ" ], "n_voice_queries": 10}.gitattributes+1
.gitignoreAdded+1
README.md+61-9
voices/thanhtruc/preview.wav → samples/conversation.mp3Renamed+2-2
voices/thanhtruc/voice.npz → samples/cross-lingual-english.mp3Renamed+2-2
voices/thanhtruc/voice.bin → samples/cross-lingual-reference-vi.mp3Renamed+2-2
samples/news-code-switch.mp3Added+3
samples/storytelling.mp3Added+3
voices/hamy/preview.wav+2-2
voices/hamy/voice.bin+1-1
voices/hamy/voice.npz+1-1
voices/index.json+1-21
voices/maichi/preview.wav+2-2
voices/thanhtruc/meta.jsonDeleted-15