README.md
7.5 KB · 182 lines · markdown Raw
1 ---
2 license: apache-2.0
3 datasets:
4 - pnnbao-ump/VieNeu-TTS-10k-ENVI
5 language:
6 - vi
7 - en
8 pipeline_tag: text-to-speech
9 tags:
10 - voice-cloning
11 - code-switching
12 - podcast
13 - emotion-control
14 - 48khz
15 ---
16
17 # 🦜 VieNeu-TTS v3 Turbo
18
19 [![GitHub](https://img.shields.io/badge/GitHub-Repository-blue)](https://github.com/pnnbao97/VieNeu-TTS)
20 [![Model](https://img.shields.io/badge/Hugging%20Face-Model-yellow)](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo)
21 [![Discord](https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white)](https://discord.gg/yJt8kzjzWZ)
22
23 ## Overview
24
25 <video controls src="https://cdn-uploads.huggingface.co/production/uploads/68b923a86c86c127a1975eda/fY6_ONxsTJ02WgNmeFpfL.mp4" width="100%"></video>
26
27 **VieNeu-TTS v3 Turbo** is the next generation of Vietnamese TTS — **48 kHz** high-fidelity speech, **instant voice cloning**, built-in **multi-speaker default voices**, inline **emotion cues**, and seamless **bilingual (En–Vi) code-switching**. It is a pure-PyTorch engine running on both **GPU and CPU**, using the **MOSS-Audio-Tokenizer-Nano** codec.
28
29 > [!NOTE]
30 > **Early access.** v3 Turbo is released for **preview**. It is fast and natural, but some features (notably the emotion cues) are still **experimental**. The full v3 release is coming in the next few weeks.
31
32 > [!IMPORTANT]
33 > **What's new in v3:**
34 > - **48 kHz audio** — a big jump in fidelity over v2 (24 kHz).
35 > - **Built-in default voices** — each default speaker is addressed by a dedicated speaker token + fixed reference, so the voice is **stable and consistent** with no reference clip needed.
36 > - **Emotion / non-verbal cues** *(experimental)* — drop `[cười]`, `[thở dài]`, `[hắng giọng]` straight into your text.
37 > - **Batched generation** — synthesize many chunks at once (batch size up to 32), including a **multi-speaker conversation** mode that batches the whole script regardless of speaker.
38 > - **Instant Voice Cloning** — still clones a voice from just **3–5 seconds** of audio (cloning is available from v3 onward; v1/v2 do not support it).
39
40 ## 🏗️ Architecture & Credits
41
42 The **VieNeu-TTS v3 Turbo architecture is an original design by the author, Phạm Nguyễn Ngọc Bảo**, and is **trained from scratch** on ~10,000 hours of English–Vietnamese speech — it is **not** a fine-tune, distillation, or adaptation of any existing TTS model.
43
44 - **Model architecture & training:** designed and trained from scratch by **Phạm Nguyễn Ngọc Bảo** — https://github.com/pnnbao97
45 - **Audio codec:** [MOSS-Audio-Tokenizer-Nano](https://huggingface.co/OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano) (OpenMOSS-Team) — 48 kHz neural audio codec.
46 - **Phonemizer:** [sea-g2p](https://github.com/pnnbao97/sea-g2p) — fast Vietnamese/English grapheme-to-phoneme, also by the author.
47
48 Tác giả: **Phạm Nguyễn Ngọc Bảo**
49
50 ## ☕ Support This Project
51
52 Training high-quality TTS models requires significant GPU resources. If you find this model useful, please consider supporting the development:
53
54 [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Support-orange?logo=buy-me-a-coffee)](https://buymeacoffee.com/pnnbao)
55
56 ---
57
58 ## 🔥 Quick Start (Web UI)
59 ```bash
60 git clone https://github.com/pnnbao97/VieNeu-TTS.git
61 cd VieNeu-TTS
62 ```
63
64 - **Option 1: CPU** (minimal, torch-free) — runs **v3 Turbo via ONNX**
65
66 ```bash
67 uv sync
68 ```
69 - **Option 2: GPU** — **v3 Turbo (PyTorch) + VieNeu-TTS v2 (GPU)**
70
71 ```bash
72 uv sync --group gpu
73 ```
74 **Start the Web UI:**
75
76 ```bash
77 uv run vieneu-web
78 ```
79
80 In the Web UI, pick **"VieNeu-TTS-v3-Turbo (Thử nghiệm)"** as the backbone. You get a **Default voice** tab, a **Voice Cloning** tab, and a **Conversation** tab (batched multi-speaker podcasts).
81
82 ---
83
84 ## 📦 Using Python SDK (vieneu)
85
86 ```bash
87 pip install vieneu
88 ```
89
90 ### Full Features Guide
91 ```python
92 from vieneu import Vieneu
93 from time import time
94
95 # Default = v3 Turbo. CPU → ONNX (torch-free); GPU → PyTorch (auto-detected).
96 tts = Vieneu()
97
98 text = f"""[cười] Trời ơi, cái giọng nó tự nhiên mà nó mượt mà dã man, nghe không khác gì người thật luôn. Giờ thì tha hồ mà quẩy content với cả kho giọng nói đa dạng, đủ mọi sắc thái biểu cảm. Mọi người bật loa lên rồi cùng trải nghiệm thử với mình nhé!"""
99
100 start_time = time()
101 # 1. Default voice (Bình An) — 48 kHz, no reference needed
102 audio = tts.infer(text)
103 tts.save(audio, "output.wav")
104 end_time = time()
105 print(f"Time taken: {end_time - start_time} seconds")
106 # 2. Built-in voices by name
107 for label, voice_id in tts.list_preset_voices():
108 print(label, voice_id)
109 audio = tts.infer("Mình là Xuân Vĩnh nè!", voice="Xuân Vĩnh")
110 tts.save(audio, "output_Xuân Vĩnh.wav")
111 # # 3. Emotion / non-verbal cues — EXPERIMENTAL: [cười] [thở dài] [hắng giọng]
112 # audio = tts.infer("Nghe hay quá đi [cười]. Để mình nói tiếp [hắng giọng].", voice="Ngọc Linh")
113
114 # # 4. Instant voice cloning from a 3–5s reference clip
115 # audio = tts.infer("Đây là giọng được nhân bản tức thì.", ref_audio="my_voice.wav")
116 ```
117
118 > [!TIP]
119 > A **temperature around 0.8** gives the most stable result for v3 Turbo. Higher values add expressiveness but can be less stable.
120
121 ---
122
123 ## 🎭 Default Voices
124
125 Built-in voices — call them by name via `voice="<name>"`, no reference audio required.
126
127 | Voice | Gender | Style |
128 |---|---|---|
129 | **Ngọc Lan** *(default)* | Female | Soft / gentle |
130 | Ngọc Linh | Female | Bright |
131 | Trúc Ly | Female | Youthful |
132 | Mỹ Duyên | Female | Smooth |
133 | Xuân Vĩnh | Male | Upbeat |
134 | Thái Sơn | Male | Firm |
135 | Gia Bảo | Male | Smooth |
136 | Đức Trí | Male | Clear |
137 | Trọng Hữu | Male | Knowledgeable |
138 | Bình An | Male | Even / calm |
139
140 For any other voice, use **Voice Cloning** with a short reference clip (`ref_audio="..."`).
141
142 ---
143
144 ## 🔬 Model Variants
145
146 | Model | Format | Device | Sample Rate | Quality | Features |
147 | --------------------- | ------- | ------- | ----------- | ---------- | ----------------------------------------- |
148 | **VieNeu-TTS-v3-Turbo** | PyTorch | GPU/CPU | 48 kHz | ⭐⭐⭐⭐⭐ | **Default voices, Cloning, Emotion cues** |
149 | VieNeu-TTS-v2 | PyTorch | GPU/CPU | 24 kHz | ⭐⭐⭐⭐⭐ | Podcast, En-Vi code-switching |
150 | VieNeu-TTS-v2 (GGUF) | GGUF Q4 | CPU | 24 kHz | ⭐⭐⭐⭐ | Fastest on CPU, Podcast |
151 | VieNeu-TTS-v1 | PyTorch | GPU | 24 kHz | ⭐⭐⭐⭐ | Stable (Vi only) |
152
153 ---
154
155 ## License
156
157 This model package is distributed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), matching the upstream model repository.
158
159 When you reuse, redistribute, or convert these assets, please keep the license notice and attribution intact for both:
160
161 - the original project: [pnnbao97/VieNeu-TTS](https://github.com/pnnbao97/VieNeu-TTS)
162 - this Hugging Face package: [pnnbao-ump/VieNeu-TTS-v3-Turbo](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo)
163
164 If you bundle additional third-party assets, their own licenses still apply as well.
165
166 ---
167 ## 📑 Citation
168
169 ```bibtex
170 @misc{vieneutts2026,
171 title = {VieNeu-TTS v3 Turbo: 48kHz Vietnamese Text-to-Speech with Instant Voice Cloning and Emotion Control},
172 author = {Pham Nguyen Ngoc Bao},
173 year = {2026},
174 publisher = {Hugging Face},
175 howpublished = {\url{https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo}}
176 }
177 ```
178
179 ---
180
181 **Made with ❤️ for the Vietnamese TTS community**
182