Instructions to use pnnbao-ump/VieNeu-TTS-v2-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pnnbao-ump/VieNeu-TTS-v2-Turbo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="pnnbao-ump/VieNeu-TTS-v2-Turbo")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pnnbao-ump/VieNeu-TTS-v2-Turbo") model = AutoModelForCausalLM.from_pretrained("pnnbao-ump/VieNeu-TTS-v2-Turbo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
π¦ VieNeu-TTS v2 Turbo (GPU Edition)
The fastest Bilingual (Vietnamese & English) TTS engine with Instant Zero-Shot Voice Cloning.
π Model Description
VieNeu-TTS v2 Turbo is the performance-tuned edition of the VieNeu-TTS family. Built on a transformer-based architecture and optimized for minimal latency, it delivers high-fidelity 24 kHz speech synthesis with Instant Voice Cloning capabilities.
This version is designed for GPU-accelerated inference (Standard/Transformers backend), making it ideal for real-time applications, interactive assistants, and creative content generation on platforms like Hugging Face Spaces (ZeroGPU).
β¨ Key Features
- π¦ Instant Voice Cloning: Clone any voice with just 3-5 seconds of reference audio. Truly zero-shotβno reference text required for v2 Turbo!
- π»π³πΊπΈ Bilingual (Code-switching): Seamlessly handles mixed VietnameseβEnglish sentences in a single utterance.
- π Extreme Speed: Optimized architecture for ultra-low latency inference on GPUs.
- π AI Watermarking: Every audio output includes an imperceptible identifier for responsible AI content tracing.
- π 24 kHz High-Fidelity: Studio-quality neural codec output.
π Quickstart
Option 1 β Install via vieneu SDK (Recommended)
# Minimal installation (Turbo/CPU Only)
pip install vieneu
# Optional: Pre-built llama-cpp-python for CPU (if building fails)
pip install vieneu --extra-index-url https://pnnbao97.github.io/llama-cpp-python-v0.3.16/cpu/
# Optional: macOS Metal acceleration
pip install vieneu --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/metal/
from vieneu import Vieneu
# Initialize in Turbo mode (Default - Minimal dependencies)
tts = Vieneu()
# 1. Simple synthesis (uses default Southern Male voice 'XuΓ’n VΔ©nh')
text = "Hα» thα»ng Δiα»n chα»§ yαΊΏu sα» dα»₯ng alternating current because it is more efficient."
audio = tts.infer(text=text)
# Save to file
tts.save(audio, "output_XuΓ’n VΔ©nh.wav")
print("πΎ Saved to output_XuΓ’n VΔ©nh.wav")
# 2. Using a specific Preset Voice
voices = tts.list_preset_voices()
for desc, voice_id in voices:
print(f"Voice: {desc} (ID: {voice_id})")
my_voice_id = voices[1][1] if len(voices) > 1 else voices[0][1] # Giα»ng PhαΊ‘m TuyΓͺn
voice_data = tts.get_preset_voice(my_voice_id)
audio_custom = tts.infer(text="TΓ΄i Δang nΓ³i bαΊ±ng giα»ng cα»§a BΓ‘c sΔ© TuyΓͺn.", voice=voice_data)
# 3. Save to file
tts.save(audio_custom, "output_PhαΊ‘m TuyΓͺn.wav")
print("πΎ Saved to output_PhαΊ‘m TuyΓͺn.wav")
π¦ Zero-shot Voice Cloning (SDK)
Clone any voice with only 3-5 seconds of audio using the local Turbo engine:
from vieneu import Vieneu
tts = Vieneu() # Defaults to Turbo mode
# 1. Encode the reference audio (extracts speaker embedding)
# Supported formats: .wav, .mp3, .flac
my_voice = tts.encode_reference("examples/audio_ref/example.wav")
# 2. Synthesize with the cloned voice
# No reference text required for Turbo v2!
audio = tts.infer(
text="ΔΓ’y lΓ giα»ng nΓ³i Δược clone trα»±c tiαΊΏp bαΊ±ng SDK cα»§a VieNeu-TTS.",
voice=my_voice
)
tts.save(audio, "cloned_voice.wav")
Option 2 β Web UI (Full repo)
git clone https://github.com/pnnbao97/VieNeu-TTS.git
cd VieNeu-TTS
uv sync # minimal install (Turbo/CPU)
uv run vieneu-web
# β Open http://127.0.0.1:7860
π¬ Model Architecture
VieNeu-TTS v2 Turbo utilizes a state-of-the-art two-stage pipeline:
- Transformer LLM Backbone: A decoder-only transformer that predicts discrete audio tokens from text and speaker embeddings.
- Neural Codec (VieNeu-Codec): A high-performance VQ-VAE decoder that converts tokens into a 24 kHz waveform with minimal artifacts.
π Training Data
Trained on a massive multi-speaker dataset comprising over 20,000 hours of high-quality speech:
| Dataset | Language | Description |
|---|---|---|
pnnbao-ump/VieNeu-TTS-1000h |
Vietnamese | DeepMind/Vietnamese studio-quality corpus |
pnnbao-ump/vietnamese-audio-corpus |
Vietnamese | Large-scale multi-accent Vietnamese data |
amphion/Emilia-Dataset |
Multilingual | Large-scale multilingual diverse speech |
facebook/multilingual_librispeech |
English | Extensive English read speech |
πΊοΈ Roadmap
- Turbo GPU (Transformers) Engine
- Bilingual (VietnameseβEnglish) Support
- Zero-shot Voice Cloning
- Mobile SDK (Android / iOS)
- Streaming API Integration
π€ Support & Links
| Resource | Link |
|---|---|
| π GitHub | pnnbao97/VieNeu-TTS |
| π Documentation | docs.vieneu.io |
| π¦ PyPI | pip install vieneu |
| π¬ Discord | Join here |
π License
Released under Apache License 2.0 β permissible for both personal and commercial use.
Made with β€οΈ for the Vietnamese TTS community by @pnnbao97 and contributors.
- Downloads last month
- 502