Text-to-Speech
GGUF
Vietnamese
realtime
tts
cpu
vietnamese
doduy1911 commited on
Commit
2182e58
·
verified ·
1 Parent(s): fee800d

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. README.md +140 -3
  3. VieNeu-TTS-0_3B-Q4_0.gguf +3 -0
  4. voices.json +268 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ VieNeu-TTS-0_3B-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,140 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ datasets:
4
+ - pnnbao-ump/VieNeu-TTS-1000h
5
+ - pnnbao-ump/VieNeu-TTS-140h
6
+ language:
7
+ - vi
8
+ base_model:
9
+ - pnnbao-ump/VieNeu-TTS-0.3B
10
+ pipeline_tag: text-to-speech
11
+ tags:
12
+ - realtime
13
+ - tts
14
+ - cpu
15
+ - vietnamese
16
+ - gguf
17
+ ---
18
+
19
+ # 🦜 VieNeu-TTS-0.3B-Q4-0-GGUF (CPU Optimized)
20
+
21
+ [![GitHub](https://img.shields.io/badge/GitHub-Repository-blue)](https://github.com/pnnbao97/VieNeu-TTS)
22
+ [![Base Model](https://img.shields.io/badge/Hugging%20Face-Base%20Model-yellow)](https://huggingface.co/pnnbao-ump/VieNeu-TTS-0.3B)
23
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white)](https://discord.gg/yJt8kzjzWZ)
24
+
25
+ **VieNeu-TTS-0.3B-Q4-0-GGUF** is a **Q4_0** quantized version of [VieNeu-TTS-0.3B](https://huggingface.co/pnnbao-ump/VieNeu-TTS-0.3B). This model is specifically optimized to run directly on the **CPU**, providing extremely fast speech synthesis without the need for a dedicated GPU.
26
+
27
+ Author: **Phạm Nguyễn Ngọc Bảo**
28
+
29
+ ## ☕ Support This Project
30
+
31
+ Training high-quality TTS models requires significant GPU resources. If you find this model useful, please consider supporting the development:
32
+
33
+ [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Support-orange?logo=buy-me-a-coffee)](https://buymeacoffee.com/pnnbao)
34
+
35
+ ---
36
+
37
+ ## 🛠️ Requirements (eSpeak NG)
38
+ eSpeak NG is **mandatory** for phonemization.
39
+ - **Windows:** Download `.msi` from [eSpeak NG Releases](https://github.com/espeak-ng/espeak-ng/releases).
40
+ - **macOS:** `brew install espeak`
41
+ - **Linux:** `sudo apt install espeak-ng`
42
+
43
+ ## 🚀 How to Use
44
+
45
+ Use the source code from GitHub for the best experience with full text preprocessing support:
46
+
47
+ ```bash
48
+ # 1. Clone repository
49
+ git clone https://github.com/pnnbao97/VieNeu-TTS.git
50
+ cd VieNeu-TTS
51
+
52
+ # 2. Sync environment (requires uv)
53
+ uv sync
54
+
55
+ # 3. Launch Web UI
56
+ uv run gradio_app.py
57
+ ```
58
+ In the UI, select **Backbone**: `VieNeu-TTS-0.3B-q4-gguf` and **Device**: `CPU`.
59
+
60
+ ---
61
+
62
+ ## 📦 Using Python SDK (vieneu)
63
+
64
+ Install the SDK to integrate VieNeu-TTS-0.3B into your research or applications:
65
+
66
+ ```bash
67
+ # Windows (Avoid llama-cpp build errors)
68
+ pip install vieneu --extra-index-url https://pnnbao97.github.io/llama-cpp-python-v0.3.16/cpu/
69
+
70
+ # Linux / MacOS
71
+ pip install vieneu
72
+ ```
73
+
74
+ ### Full Features Guide
75
+ ```python
76
+ from vieneu import Vieneu
77
+ import os
78
+
79
+ # Initialization
80
+ tts = Vieneu() # Default: 0.3B-Q4 GGUF for CPU
81
+ os.makedirs("outputs", exist_ok=True)
82
+
83
+ # 1. List preset voices
84
+ available_voices = tts.list_preset_voices()
85
+ for desc, name in available_voices:
86
+ print(f" - {desc} (ID: {name})")
87
+
88
+ # 2. Use specific voice (dynamically select second voice)
89
+ if available_voices:
90
+ _, my_voice_id = available_voices[1] if len(available_voices) > 1 else available_voices[0]
91
+ voice_data = tts.get_preset_voice(my_voice_id)
92
+ audio_spec = tts.infer(text="Chào bạn, tôi đang nói bằng giọng của bác sĩ Tuyên.", voice=voice_data)
93
+ tts.save(audio_spec, f"outputs/standard_{my_voice_id}.wav")
94
+ print(f"💾 Saved synthesis to: outputs/standard_{my_voice_id}.wav")
95
+
96
+ # 3. Standard synthesis (uses default voice)
97
+ text = "Xin chào, tôi là VieNeu. Tôi có thể giúp bạn đọc sách, làm chatbot thời gian thực, hoặc thậm chí clone giọng nói của bạn."
98
+ audio = tts.infer(text=text)
99
+ tts.save(audio, "outputs/standard_output.wav")
100
+ print("💾 Saved synthesis to: outputs/standard_output.wav")
101
+
102
+ # 4. Zero-shot voice cloning
103
+ if os.path.exists("examples/audio_ref/example_ngoc_huyen.wav"):
104
+ cloned_audio = tts.infer(
105
+ text="Đây là giọng nói đã được clone thành công từ file mẫu.",
106
+ ref_audio="examples/audio_ref/example_ngoc_huyen.wav",
107
+ ref_text="Tác phẩm dự thi bảo đảm tính khoa học, tính đảng, tính chiến đấu, tính định hướng."
108
+ )
109
+ tts.save(cloned_audio, "outputs/standard_cloned_output.wav")
110
+ print("💾 Saved cloned voice to: outputs/standard_cloned_output.wav")
111
+
112
+ # 5. Cleanup
113
+ tts.close()
114
+ ```
115
+
116
+ ## 📊 Technical Specifications
117
+ - **Format**: GGUF (Q4_0)
118
+ - **Size**: ~200 MB
119
+ - **Standard Devices**: Office laptops, Mini PCs, and computers without GPUs.
120
+ - **Performance**: Achieves real-time speed even on standard consumer CPUs.
121
+
122
+ ## ⚠️ Licensing & Copyright
123
+ This model is released under the **CC BY-NC 4.0** license.
124
+ - ✅ **Free:** For students, researchers, and non-profit purposes.
125
+ - ⚠️ **Commercial/Enterprise:** Use for businesses or commercial products is strictly prohibited without prior authorization.
126
+ - **Commercial Licensing:** Please contact the author (**Phạm Nguyễn Ngọc Bảo**) for licensing terms (Estimated: **5,000 USD/year** - negotiable).
127
+
128
+ ## 📑 Citation
129
+ ```bibtex
130
+ @misc{vieneutts03bgguf2026,
131
+ title = {VieNeu-TTS-0.3B-GGUF: CPU-Optimized Vietnamese Text-to-Speech},
132
+ author = {Pham Nguyen Ngoc Bao},
133
+ year = {2026},
134
+ publisher = {Hugging Face},
135
+ howpublished = {\url{https://huggingface.co/pnnbao-ump/VieNeu-TTS-0.3B-q4-gguf}}
136
+ }
137
+ ```
138
+
139
+ ---
140
+ **Made with ❤️ for the Vietnamese TTS community**
VieNeu-TTS-0_3B-Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9c588db01565a9607fef7dcc3cce517f2e6c2d3e74e4ac8357d9e70de8ed897
3
+ size 202059392
voices.json ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "meta": {
3
+ "spec": "vieneu.voice.presets",
4
+ "spec_version": "1.0",
5
+ "engine": "VieNeu-TTS",
6
+ "author": "Phạm Nguyễn Ngọc Bảo (pnnbao-ump)",
7
+ "license": "CC BY-NC 4.0",
8
+ "homepage": "https://github.com/pnnbao97/VieNeu-TTS",
9
+ "notice": "Model and voices are for non-commercial use only. Mention pnnbao-ump when using."
10
+ },
11
+ "default_voice": "voice_nu",
12
+ "presets": {
13
+ "voice_nu": {
14
+ "codes": [
15
+ 58770,
16
+ 45478,
17
+ 41370,
18
+ 45642,
19
+ 30026,
20
+ 25882,
21
+ 25098,
22
+ 53674,
23
+ 57862,
24
+ 53589,
25
+ 53765,
26
+ 55386,
27
+ 2229,
28
+ 55427,
29
+ 49254,
30
+ 57463,
31
+ 5053,
32
+ 22329,
33
+ 12987,
34
+ 13882,
35
+ 52531,
36
+ 21885,
37
+ 302,
38
+ 32837,
39
+ 23500,
40
+ 9262,
41
+ 5132,
42
+ 9389,
43
+ 44245,
44
+ 24422,
45
+ 2471,
46
+ 6759,
47
+ 27571,
48
+ 38059,
49
+ 28532,
50
+ 32500,
51
+ 44920,
52
+ 40557,
53
+ 14746,
54
+ 47643,
55
+ 5151,
56
+ 2068,
57
+ 1336,
58
+ 34089,
59
+ 51670,
60
+ 23273,
61
+ 26798,
62
+ 6365,
63
+ 1691,
64
+ 31207,
65
+ 27111,
66
+ 22311,
67
+ 44774,
68
+ 56758,
69
+ 52691,
70
+ 9244,
71
+ 27412,
72
+ 11394,
73
+ 9510,
74
+ 5282,
75
+ 546,
76
+ 1811,
77
+ 26903,
78
+ 11289,
79
+ 8193,
80
+ 3117,
81
+ 24600,
82
+ 54530,
83
+ 38601,
84
+ 25687,
85
+ 7513,
86
+ 25415,
87
+ 31049,
88
+ 31117,
89
+ 29319,
90
+ 40584,
91
+ 31511,
92
+ 56743,
93
+ 43491,
94
+ 21107,
95
+ 19185,
96
+ 46915,
97
+ 46087,
98
+ 25,
99
+ 57602,
100
+ 4432,
101
+ 61857,
102
+ 51297,
103
+ 59874,
104
+ 53137,
105
+ 52049,
106
+ 1540,
107
+ 18186,
108
+ 33606,
109
+ 35642,
110
+ 653,
111
+ 20750,
112
+ 12356,
113
+ 22233,
114
+ 22390,
115
+ 46835,
116
+ 8777,
117
+ 45848,
118
+ 31096,
119
+ 13109,
120
+ 12724,
121
+ 12712,
122
+ 12869,
123
+ 40163,
124
+ 56546,
125
+ 18609,
126
+ 36054,
127
+ 59470,
128
+ 55646,
129
+ 55402,
130
+ 55459,
131
+ 57414,
132
+ 53595,
133
+ 37004,
134
+ 25163,
135
+ 20763,
136
+ 37213,
137
+ 38427,
138
+ 53725,
139
+ 42519,
140
+ 53645,
141
+ 61959,
142
+ 53702,
143
+ 58506,
144
+ 42070,
145
+ 11674,
146
+ 1138,
147
+ 51365,
148
+ 23967,
149
+ 1844,
150
+ 11148,
151
+ 13144,
152
+ 5826,
153
+ 49139,
154
+ 8519,
155
+ 516,
156
+ 1352,
157
+ 516,
158
+ 4100,
159
+ 120,
160
+ 4373,
161
+ 7859,
162
+ 8220,
163
+ 54823,
164
+ 4597,
165
+ 12406,
166
+ 39671,
167
+ 39862,
168
+ 49122,
169
+ 30342,
170
+ 41829,
171
+ 5749,
172
+ 30527,
173
+ 27314,
174
+ 60327,
175
+ 16430,
176
+ 45,
177
+ 41350,
178
+ 8732,
179
+ 13388,
180
+ 37928,
181
+ 60898,
182
+ 27354,
183
+ 14755,
184
+ 20467,
185
+ 14844,
186
+ 35640,
187
+ 31485,
188
+ 26536,
189
+ 5786,
190
+ 44770,
191
+ 17799,
192
+ 13144,
193
+ 2776,
194
+ 26473,
195
+ 32169,
196
+ 14205,
197
+ 10685,
198
+ 56426,
199
+ 54350,
200
+ 51577,
201
+ 25738,
202
+ 18054,
203
+ 1541,
204
+ 1418,
205
+ 3288,
206
+ 391,
207
+ 2457,
208
+ 22925,
209
+ 4494,
210
+ 7387,
211
+ 40679,
212
+ 39659,
213
+ 43691,
214
+ 56039,
215
+ 56502,
216
+ 60839,
217
+ 2040,
218
+ 26420,
219
+ 15029,
220
+ 36018,
221
+ 52721,
222
+ 10332,
223
+ 32110,
224
+ 6956,
225
+ 40877,
226
+ 47646,
227
+ 15524,
228
+ 32358,
229
+ 64998,
230
+ 47078,
231
+ 23491,
232
+ 12953,
233
+ 17200,
234
+ 29241,
235
+ 12820,
236
+ 14998,
237
+ 28659,
238
+ 28811,
239
+ 51545,
240
+ 51321,
241
+ 52327,
242
+ 56218,
243
+ 36249,
244
+ 23062,
245
+ 36006,
246
+ 19383,
247
+ 35539,
248
+ 42314,
249
+ 39526,
250
+ 17031,
251
+ 33549,
252
+ 38221,
253
+ 1353,
254
+ 21258,
255
+ 10901,
256
+ 8974,
257
+ 2957,
258
+ 35031,
259
+ 55528,
260
+ 58562,
261
+ 45068,
262
+ 52322
263
+ ],
264
+ "text": "Thì chọn màu son tươi sáng thì sẽ rất là đẹp Ở đây thì mình chọn màu đỏ cam của cỏ mềm hôn áp",
265
+ "description": "voice Nu"
266
+ }
267
+ }
268
+ }