.gitattributes CHANGED
@@ -4,4 +4,5 @@
4
  *.npz filter=lfs diff=lfs merge=lfs -text
5
  *.bin filter=lfs diff=lfs merge=lfs -text
6
  *.wav filter=lfs diff=lfs merge=lfs -text
 
7
  banner.png filter=lfs diff=lfs merge=lfs -text
 
4
  *.npz filter=lfs diff=lfs merge=lfs -text
5
  *.bin filter=lfs diff=lfs merge=lfs -text
6
  *.wav filter=lfs diff=lfs merge=lfs -text
7
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
8
  banner.png filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ *.DS_Store
README.md CHANGED
@@ -96,8 +96,8 @@ model-index:
96
 
97
  ### 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.
98
 
99
- **The most accurate open Vietnamese TTS we know of — 13× fewer word errors than
100
- the next open model**, and it runs faster than real time on a laptop CPU.
101
 
102
  * 🎯 **Ultra-natural** — 2.91 UTMOS, ~0.5 MOS above every other open Vietnamese
103
  system, with near-zero dead air (0.029 s vs 0.23–0.53 s).
@@ -107,11 +107,36 @@ the next open model**, and it runs faster than real time on a laptop CPU.
107
  * ⚡ **Real-time on CPU, streaming** — ~2× faster than real time (RTF 0.5×),
108
  first audio chunk in ~70 ms. No GPU required.
109
  * 🇻🇳 **Built for Vietnamese** — tones, code-switched English, and a built-in
110
- normalizer that reads `31/12/2025` and `1.250 tỷ` the way a person would.
111
 
112
  * Code, examples, browser demo: **https://github.com/zeroweight-ai/ZeroTTS**
113
  * Benchmark dataset: **https://huggingface.co/datasets/zeroweight-ai/ZeroBench-TTS**
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  ```python
116
  pip install zerotts
117
  ```
@@ -127,8 +152,33 @@ tts.save_audio(audio, "out.wav")
127
  Streaming, with first audio in roughly 70 ms:
128
 
129
  ```python
130
- for chunk in tts.synthesize_stream("Một đoạn văn bản dài hơn…", voice="maichi"):
131
- play(chunk) # (1, n) float32 at 48 kHz
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  ```
133
 
134
  ## Benchmarks
@@ -146,11 +196,13 @@ spoken out, from the benchmark's own curated reading.
146
  | **Dead air** (excess silence) ↓ | **0.029 s** | 0.386 s | 0.568 s | 0.215 s |
147
  | **RTF, CPU** ↓ | **0.50×** | 6.12× | 0.71× | 0.73× |
148
  | **Time to first audio, CPU** ↓ | **~70 ms** | ~34 s | ~6.1 s | ~5.1 s |
149
- | Size | **81 M**, CPU | 3.1 GB, GPU | 1.9 GB, GPU | 1.9 GB, GPU |
150
 
151
- **4× fewer word errors than the next-best system**, and the only one of the four
152
- that's actually fast on CPU the others are sized and tuned for a GPU, and it
153
- shows.
 
 
154
 
155
  Full comparison tables, per-subset breakdowns, and CPU speed methodology:
156
  **[docs/BENCHMARKS.md](https://github.com/zeroweight-ai/ZeroTTS/blob/main/docs/BENCHMARKS.md)**
 
96
 
97
  ### 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.
98
 
99
+ **The most accurate open Vietnamese TTS we know of — 4× fewer word errors than
100
+ the next best model**, and it runs faster than real time on a laptop CPU.
101
 
102
  * 🎯 **Ultra-natural** — 2.91 UTMOS, ~0.5 MOS above every other open Vietnamese
103
  system, with near-zero dead air (0.029 s vs 0.23–0.53 s).
 
107
  * ⚡ **Real-time on CPU, streaming** — ~2× faster than real time (RTF 0.5×),
108
  first audio chunk in ~70 ms. No GPU required.
109
  * 🇻🇳 **Built for Vietnamese** — tones, code-switched English, and a built-in
110
+ normalizer that reads `31/12/2025` and `ZeroTTS` the way a person would.
111
 
112
  * Code, examples, browser demo: **https://github.com/zeroweight-ai/ZeroTTS**
113
  * Benchmark dataset: **https://huggingface.co/datasets/zeroweight-ai/ZeroBench-TTS**
114
 
115
+ ## Samples
116
+
117
+ **Two-speaker conversation**
118
+
119
+ <audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/conversation.mp3" type="audio/mpeg"></audio>
120
+
121
+ **Long-form narration**
122
+
123
+ <audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/storytelling.mp3" type="audio/mpeg"></audio>
124
+
125
+ **News read, code-switched English**
126
+
127
+ <audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/news-code-switch.mp3" type="audio/mpeg"></audio>
128
+
129
+ **Cross-lingual**
130
+
131
+ Reference audio (Vietnamese)
132
+
133
+ <audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/cross-lingual-reference-vi.mp3" type="audio/mpeg"></audio>
134
+
135
+ Output (English)
136
+
137
+ <audio controls><source src="https://huggingface.co/zeroweight-ai/ZeroTTS/resolve/main/samples/cross-lingual-english.mp3" type="audio/mpeg"></audio>
138
+
139
+ ## Usage
140
  ```python
141
  pip install zerotts
142
  ```
 
152
  Streaming, with first audio in roughly 70 ms:
153
 
154
  ```python
155
+ import queue
156
+
157
+ import numpy as np
158
+ import sounddevice as sd # pip install sounddevice
159
+
160
+ TEXT = ("Đây là chế độ phát trực tuyến. Âm thanh được tạo ra và phát ngay lập tức, "
161
+ "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 "
162
+ "khoảng 70 mili giây là đã nghe thấy câu đầu tiên, ngay cả khi mô "
163
+ "hình đang chạy trên CPU của một chiếc laptop bình thường.")
164
+
165
+ pending, tail = queue.Queue(), np.zeros(0, dtype="float32")
166
+
167
+ def feed(outdata, frames, _time, _status):
168
+ global tail
169
+ while len(tail) < frames and not pending.empty():
170
+ tail = np.concatenate([tail, pending.get_nowait()])
171
+ n = min(frames, len(tail))
172
+ outdata[:n, 0] = tail[:n]
173
+ outdata[n:] = 0
174
+ tail = tail[n:]
175
+
176
+ with sd.OutputStream(samplerate=tts.sample_rate, channels=1,
177
+ dtype="float32", callback=feed):
178
+ for chunk in tts.synthesize_stream(TEXT, voice="maichi"):
179
+ pending.put(chunk.reshape(-1)) # chunk is (1, n) float32 at 48 kHz
180
+ while not pending.empty() or len(tail):
181
+ sd.sleep(50) # let the buffer drain before closing
182
  ```
183
 
184
  ## Benchmarks
 
196
  | **Dead air** (excess silence) ↓ | **0.029 s** | 0.386 s | 0.568 s | 0.215 s |
197
  | **RTF, CPU** ↓ | **0.50×** | 6.12× | 0.71× | 0.73× |
198
  | **Time to first audio, CPU** ↓ | **~70 ms** | ~34 s | ~6.1 s | ~5.1 s |
199
+ | Size | **202 M** params, 0.86 GB fp32, CPU | 3.1 GB, GPU | 1.9 GB, GPU | 1.9 GB, GPU |
200
 
201
+ **4× fewer word errors than the next-best system**, and the fastest of the four
202
+ on CPU. The gap is much wider in latency than in throughput: the two XTTS
203
+ fine-tunes also beat real time (0.71×) but need seconds to emit their first
204
+ sample, while OmniVoice is 6× *slower* than real time. All three are sized and
205
+ tuned for a GPU, and it shows.
206
 
207
  Full comparison tables, per-subset breakdowns, and CPU speed methodology:
208
  **[docs/BENCHMARKS.md](https://github.com/zeroweight-ai/ZeroTTS/blob/main/docs/BENCHMARKS.md)**
voices/thanhtruc/preview.wav → samples/conversation.mp3 RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:97e3120194132cd37ae79d6362aaa06cfc9bd971ec59e258be4f183bacbea5b6
3
- size 599084
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac110a35c09efbdfd91354c53330df511d9eaf9faf21a378c94fc4f15f1efc34
3
+ size 188588
voices/thanhtruc/voice.npz → samples/cross-lingual-english.mp3 RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4103e4f3aaee2396bc2a1c986e2db1a2ae62b227ed0f1bcc2f1a9e4ef4d8ed1
3
- size 31262
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a318f85ed126ab59f17f22ac76552a42c5240f5c445270892630513a2db62c7
3
+ size 263468
voices/thanhtruc/voice.bin → samples/cross-lingual-reference-vi.mp3 RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d443df8e986d5b08afe934c77764eaa76c326864407c2d6f96cbb09120acef5
3
- size 30720
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b019bb424b186aaf26c721eb2a7ed68eeb3ca9cff8f3c3fe062151fbaaea003
3
+ size 34220
samples/news-code-switch.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be58f3701e6169d33ee23502b0b4674be269f03c6ae113035b671a3d20f9783a
3
+ size 544172
samples/storytelling.mp3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0ab526814b46d0bd6c9fdf1026338dc84089cf7e7d9da5552d334ba972d7775
3
+ size 971564
voices/hamy/preview.wav CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6aab12b5fa3d00b5e5dffe826b30fc7c7062c9e3da403d39831dab693d1f3f0d
3
- size 529964
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bc33835023d7786bc75cb6c5c2681b1aec1ca3fb01300044b30d2161b29a171
3
+ size 460844
voices/hamy/voice.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a385bc5fc73bc11ebc7cbde39c447ed1b476cb9970c293bd4e26ff66fd11119d
3
  size 30720
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e137f9544c20c491b3d139aeebb1d8549f8bd6f84f035a2df78830d3baec025d
3
  size 30720
voices/hamy/voice.npz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b922963b868a0e403690194782b57f2a11aec55f59e0314566cb80bba71b332b
3
  size 31262
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a864c127386f74976154c840875f6ad615d74c377768bc6edcb75e3278f228b7
3
  size 31262
voices/index.json CHANGED
@@ -159,26 +159,6 @@
159
  10,
160
  768
161
  ]
162
- },
163
- {
164
- "name": "thanhtruc",
165
- "display_name": "Thanh Trúc",
166
- "language": "vi",
167
- "gender": "nữ",
168
- "description": "nữ, trẻ, dịu dàng, thủ thỉ, nhẹ",
169
- "tags": [
170
- "nữ",
171
- "trẻ",
172
- "dịu dàng",
173
- "thủ thỉ",
174
- "nhẹ"
175
- ],
176
- "n_voice_queries": 10,
177
- "shape": [
178
- 1,
179
- 10,
180
- 768
181
- ]
182
  }
183
  ]
184
- }
 
159
  10,
160
  768
161
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
  ]
164
+ }
voices/maichi/preview.wav CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a2b2c3fc41b652477139fc0b63bc35399e6d0d07b55470be4603e8024a64f4bf
3
- size 606764
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:987b84f2287607d58d08b4979f0bf5387a8235bc2eff28263065de34481caa67
3
+ size 491564
voices/thanhtruc/meta.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "name": "thanhtruc",
3
- "display_name": "Thanh Trúc",
4
- "language": "vi",
5
- "gender": "nữ",
6
- "description": "nữ, trẻ, dịu dàng, thủ thỉ, nhẹ",
7
- "tags": [
8
- "nữ",
9
- "trẻ",
10
- "dịu dàng",
11
- "thủ thỉ",
12
- "nhẹ"
13
- ],
14
- "n_voice_queries": 10
15
- }