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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
[](https://github.com/pnnbao97/VieNeu-TTS)
|
| 20 |
+
[](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo)
|
| 21 |
+
[](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 |
+
[](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 |
+
# Install uv (if you haven't)
|
| 64 |
+
# Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
|
| 65 |
+
# Linux/macOS: curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 66 |
+
|
| 67 |
+
# Install dependencies & Run
|
| 68 |
+
uv sync --group gpu
|
| 69 |
+
uv run vieneu-web
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
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).
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
## 📦 Using Python SDK (vieneu)
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
# Linux / MacOS
|
| 80 |
+
pip install vieneu
|
| 81 |
+
|
| 82 |
+
# Windows (avoid llama-cpp build errors)
|
| 83 |
+
pip install vieneu --extra-index-url https://pnnbao97.github.io/llama-cpp-python-v0.3.16/cpu/
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### Full Features Guide
|
| 87 |
+
```python
|
| 88 |
+
from vieneu import Vieneu
|
| 89 |
+
|
| 90 |
+
# Load v3 Turbo (48 kHz) together with the built-in default voices.
|
| 91 |
+
tts = Vieneu(mode="v3turbo")
|
| 92 |
+
|
| 93 |
+
# 1. Simple synthesis with the default voice (Ngọc Lan)
|
| 94 |
+
text = "Xin chào, đây là VieNeu-TTS phiên bản ba Turbo. Giọng nói tự nhiên, mượt mà như người thật."
|
| 95 |
+
audio = tts.infer(text)
|
| 96 |
+
tts.save(audio, "output.wav") # 48 kHz
|
| 97 |
+
print("💾 Saved to output.wav")
|
| 98 |
+
|
| 99 |
+
# 2. Pick a built-in default voice by name (no reference needed)
|
| 100 |
+
for label, voice_id in tts.list_preset_voices():
|
| 101 |
+
print(f"Voice: {label} (ID: {voice_id})")
|
| 102 |
+
|
| 103 |
+
audio = tts.infer("Mình là Xuân Vĩnh, rất vui được gặp các bạn.", voice="Xuân Vĩnh")
|
| 104 |
+
tts.save(audio, "output_xuanvinh.wav")
|
| 105 |
+
|
| 106 |
+
# 3. Emotion / non-verbal cues — EXPERIMENTAL
|
| 107 |
+
# [cười] = chuckle, [thở dài] = sigh, [hắng giọng] = clear throat
|
| 108 |
+
audio = tts.infer("Trời ơi nghe hay quá đi [cười]. Để mình nói tiếp nhé [hắng giọng].",
|
| 109 |
+
voice="Ngọc Linh")
|
| 110 |
+
tts.save(audio, "output_emotion.wav")
|
| 111 |
+
|
| 112 |
+
# 4. Instant voice cloning from a 3–5s reference clip
|
| 113 |
+
audio = tts.infer("Đây là giọng nói được nhân bản tức thì.", ref_audio="my_voice.wav")
|
| 114 |
+
tts.save(audio, "output_clone.wav")
|
| 115 |
+
|
| 116 |
+
# 5. Low-latency streaming
|
| 117 |
+
for chunk in tts.infer_stream("Văn bản dài sẽ được phát theo từng đoạn.", voice="Ngọc Lan"):
|
| 118 |
+
... # play / send each chunk as it is produced
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
> [!TIP]
|
| 122 |
+
> A **temperature around 0.8** gives the most stable result for v3 Turbo. Higher values add expressiveness but can be less stable.
|
| 123 |
+
|
| 124 |
+
---
|
| 125 |
+
|
| 126 |
+
## 🎭 Default Voices
|
| 127 |
+
|
| 128 |
+
Built-in voices — call them by name via `voice="<name>"`, no reference audio required.
|
| 129 |
+
|
| 130 |
+
| Voice | Gender | Style |
|
| 131 |
+
|---|---|---|
|
| 132 |
+
| **Ngọc Lan** *(default)* | Female | Soft / gentle |
|
| 133 |
+
| Ngọc Linh | Female | Bright |
|
| 134 |
+
| Trúc Ly | Female | Youthful |
|
| 135 |
+
| Mỹ Duyên | Female | Smooth |
|
| 136 |
+
| Xuân Vĩnh | Male | Upbeat |
|
| 137 |
+
| Thái Sơn | Male | Firm |
|
| 138 |
+
| Gia Bảo | Male | Smooth |
|
| 139 |
+
| Đức Trí | Male | Clear |
|
| 140 |
+
| Trọng Hữu | Male | Knowledgeable |
|
| 141 |
+
| Bình An | Male | Even / calm |
|
| 142 |
+
|
| 143 |
+
For any other voice, use **Voice Cloning** with a short reference clip (`ref_audio="..."`).
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
## 🔬 Model Variants
|
| 148 |
+
|
| 149 |
+
| Model | Format | Device | Sample Rate | Quality | Features |
|
| 150 |
+
| --------------------- | ------- | ------- | ----------- | ---------- | ----------------------------------------- |
|
| 151 |
+
| **VieNeu-TTS-v3-Turbo** | PyTorch | GPU/CPU | 48 kHz | ⭐⭐⭐⭐⭐ | **Default voices, Cloning, Emotion cues** |
|
| 152 |
+
| VieNeu-TTS-v2 | PyTorch | GPU/CPU | 24 kHz | ⭐⭐⭐⭐⭐ | Podcast, En-Vi code-switching |
|
| 153 |
+
| VieNeu-TTS-v2 (GGUF) | GGUF Q4 | CPU | 24 kHz | ⭐⭐⭐⭐ | Fastest on CPU, Podcast |
|
| 154 |
+
| VieNeu-TTS-v1 | PyTorch | GPU | 24 kHz | ⭐⭐⭐⭐ | Stable (Vi only) |
|
| 155 |
+
|
| 156 |
+
---
|
| 157 |
+
|
| 158 |
+
## 📑 Citation
|
| 159 |
+
|
| 160 |
+
```bibtex
|
| 161 |
+
@misc{vieneutts2026,
|
| 162 |
+
title = {VieNeu-TTS v3 Turbo: 48kHz Vietnamese Text-to-Speech with Instant Voice Cloning and Emotion Control},
|
| 163 |
+
author = {Pham Nguyen Ngoc Bao},
|
| 164 |
+
year = {2026},
|
| 165 |
+
publisher = {Hugging Face},
|
| 166 |
+
howpublished = {\url{https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo}}
|
| 167 |
+
}
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
---
|
| 171 |
+
|
| 172 |
+
**Made with ❤️ for the Vietnamese TTS community**
|