Configuration Parsing Warning:Config file tokenizer_config.json cannot be fetched (too big)
🦜 VieNeu-TTS
Overview
VieNeu-TTS-v2 is the next generation of Vietnamese TTS, designed for Natural Communication, Podcasts, and Bilingual (En-Vi) Code-switching.
What's new in V2:
- 10,000+ Hours Data: Trained on a massive bilingual dataset for unparalleled naturalness.
- Multi-Speaker Conversation: Support for podcast-style scripts with distinct voices and emotional nuances.
- Seamless Code-switching: High-quality English integration within Vietnamese sentences.
- Instant Voice Cloning: Still supports cloning with just 3-5 seconds of audio.
This project features the flagship VieNeu-TTS-v2 architecture:
- VieNeu-TTS-v2 (0.3B): Optimized for high-fidelity bilingual speech and long-form content.
- VieNeu-TTS-v2-Turbo: Optimized for ultra-low latency and CPU deployment using GGUF.
Tác giả: Phạm Nguyễn Ngọc Bảo
☕ Support This Project
Training high-quality TTS models requires significant GPU resources. If you find this model useful, please consider supporting the development:
🦜 Voice Cloning Inference
Reference Voice (Speaker Example):
Input Text:
Trên bầu trời xanh thẳm, những đám mây trắng lửng lờ trôi như những chiếc thuyền nhỏ đang lướt nhẹ theo dòng gió. Dưới mặt đất, cánh đồng lúa vàng rực trải dài tới tận chân trời, những bông lúa nghiêng mình theo từng làn gió.
Generated Output (Cloned Voice):
🔥 Quick Start (Web UI)
1. Installation
git clone https://github.com/pnnbao97/VieNeu-TTS.git
cd VieNeu-TTS
# Install uv (if you haven't)
# Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Linux/macOS: curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies & Run
uv sync --group gpu
uv run vieneu-web
2. Demo Video
📦 Using Python SDK (vieneu)
Install the SDK to integrate VieNeu-TTS-0.3B into your research or applications:
# Windows (Avoid llama-cpp build errors)
pip install vieneu --extra-index-url https://pnnbao97.github.io/llama-cpp-python-v0.3.16/cpu/
# Linux / MacOS
pip install vieneu
Full Features Guide
from vieneu import Vieneu
import os
# Initialization
tts = Vieneu() # Default: 0.3B-Q4 GGUF for CPU
os.makedirs("outputs", exist_ok=True)
# 1. List preset voices
available_voices = tts.list_preset_voices()
for desc, name in available_voices:
print(f" - {desc} (ID: {name})")
# 2. Use specific voice (dynamically select second voice)
if available_voices:
_, my_voice_id = available_voices[1] if len(available_voices) > 1 else available_voices[0]
voice_data = tts.get_preset_voice(my_voice_id)
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)
tts.save(audio_spec, f"outputs/standard_{my_voice_id}.wav")
print(f"💾 Saved synthesis to: outputs/standard_{my_voice_id}.wav")
# 3. Standard synthesis (uses default voice)
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."
audio = tts.infer(text=text)
tts.save(audio, "outputs/standard_output.wav")
print("💾 Saved synthesis to: outputs/standard_output.wav")
# 4. Zero-shot voice cloning
if os.path.exists("examples/audio_ref/example_ngoc_huyen.wav"):
cloned_audio = tts.infer(
text="Đây là giọng nói đã được clone thành công từ file mẫu.",
ref_audio="examples/audio_ref/example_ngoc_huyen.wav",
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."
)
tts.save(cloned_audio, "outputs/standard_cloned_output.wav")
print("💾 Saved cloned voice to: outputs/standard_cloned_output.wav")
# 5. Cleanup
tts.close()
Remote Mode (Ultra-Fast with LMDeploy Server)
For maximum speed, deploy a Docker server first, then connect remotely:
Step 1: Deploy Docker Server
docker run --gpus all -p 23333:23333 pnnbao/vieneu-tts:serve --model pnnbao-ump/VieNeu-TTS --tunnel
Step 2: Connect from Client
from vieneu import Vieneu
import os
# Configuration
REMOTE_API_BASE = 'http://your-server-ip:23333/v1' # Or bore.pub:XXXX
REMOTE_MODEL_ID = "pnnbao-ump/VieNeu-TTS"
# Initialization (LIGHTWEIGHT - only loads small codec locally)
tts = Vieneu(mode='remote', api_base=REMOTE_API_BASE, model_name=REMOTE_MODEL_ID)
os.makedirs("outputs", exist_ok=True)
# List remote voices
available_voices = tts.list_preset_voices()
for desc, name in available_voices:
print(f" - {desc} (ID: {name})")
# Use specific voice
if available_voices:
_, my_voice_id = available_voices[1]
voice_data = tts.get_preset_voice(my_voice_id)
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)
tts.save(audio_spec, f"outputs/remote_{my_voice_id}.wav")
print(f"💾 Saved synthesis to: outputs/remote_{my_voice_id}.wav")
# Standard synthesis
text_input = "Chế độ remote giúp tích hợp VieNeu vào ứng dụng Web hoặc App cực nhanh mà không cần GPU tại máy khách."
audio = tts.infer(text=text_input)
tts.save(audio, "outputs/remote_output.wav")
print("💾 Saved remote synthesis to: outputs/remote_output.wav")
# Zero-shot voice cloning (encodes audio locally, sends codes to server)
if os.path.exists("examples/audio_ref/example_ngoc_huyen.wav"):
cloned_audio = tts.infer(
text="Đây là giọng nói được clone và xử lý thông qua VieNeu Server.",
ref_audio="examples/audio_ref/example_ngoc_huyen.wav",
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."
)
tts.save(cloned_audio, "outputs/remote_cloned_output.wav")
print("💾 Saved remote cloned voice to: outputs/remote_cloned_output.wav")
📋 Reference Voices
| File | Gender | Accent | Description |
|---|---|---|---|
| Bình | Male | North | Male voice, North accent |
| Tuyên | Male | North | Male voice, North accent |
| Nguyên | Male | South | Male voice, South accent |
| Hương | Female | North | Female voice, North accent |
| Ngọc | Female | North | Female voice, North accent |
| Đoan | Female | South | Female voice, South accent |
🔬 Model Variants
| Model | Format | Device | Quality | Features |
|---|---|---|---|---|
| VieNeu-TTS-v2 | PyTorch | GPU/CPU | ⭐⭐⭐⭐⭐ | Podcast, En-Vi CS |
| VieNeu-TTS-v2 (GGUF) | GGUF Q4 | CPU | ⭐⭐⭐⭐ | Fastest CPU, Podcast |
| VieNeu-TTS-v1 | PyTorch | GPU | ⭐⭐⭐⭐ | Stable (Vi only) |
| VieNeu-TTS-0.3B | PyTorch | GPU/CPU | ⭐⭐⭐ | Legacy Ultra-Fast |
📑 Citation
@misc{vieneutts2026,
title = {VieNeu-TTS-v2: Vietnamese Text-to-Speech with Instant Voice Cloning},
author = {Pham Nguyen Ngoc Bao},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/pnnbao-ump/VieNeu-TTS}}
}
Made with ❤️ for the Vietnamese TTS community
- Downloads last month
- 65
