Instructions to use quocquan2207/VieNeu-TTS-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use quocquan2207/VieNeu-TTS-v2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf quocquan2207/VieNeu-TTS-v2 # Run inference directly in the terminal: llama cli -hf quocquan2207/VieNeu-TTS-v2
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf quocquan2207/VieNeu-TTS-v2 # Run inference directly in the terminal: llama cli -hf quocquan2207/VieNeu-TTS-v2
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf quocquan2207/VieNeu-TTS-v2 # Run inference directly in the terminal: ./llama-cli -hf quocquan2207/VieNeu-TTS-v2
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf quocquan2207/VieNeu-TTS-v2 # Run inference directly in the terminal: ./build/bin/llama-cli -hf quocquan2207/VieNeu-TTS-v2
Use Docker
docker model run hf.co/quocquan2207/VieNeu-TTS-v2
- LM Studio
- Jan
- Ollama
How to use quocquan2207/VieNeu-TTS-v2 with Ollama:
ollama run hf.co/quocquan2207/VieNeu-TTS-v2
- Unsloth Desktop
- Docker Model Runner
How to use quocquan2207/VieNeu-TTS-v2 with Docker Model Runner:
docker model run hf.co/quocquan2207/VieNeu-TTS-v2
- Lemonade
How to use quocquan2207/VieNeu-TTS-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull quocquan2207/VieNeu-TTS-v2
Run and chat with the model
lemonade run user.VieNeu-TTS-v2-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
| license: apache-2.0 | |
| datasets: | |
| - pnnbao-ump/VieNeu-TTS-10k-ENVI | |
| language: | |
| - vi | |
| - en | |
| pipeline_tag: text-to-speech | |
| tags: | |
| - podcast | |
| - code-switching | |
| - voice-cloning | |
| # 🦜 VieNeu-TTS | |
| [](https://github.com/pnnbao97/VieNeu-TTS) | |
| [](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v2) | |
| [](https://discord.gg/yJt8kzjzWZ) | |
| <video controls src="https://cdn-uploads.huggingface.co/production/uploads/68b923a86c86c127a1975eda/q_6GIX5qXs9ZbIwKyy8GS.mp4" width="100%"></video> | |
| ## Overview | |
| **VieNeu-TTS-v2** is the next generation of Vietnamese TTS, designed for **Natural Communication**, **Podcasts**, and **Bilingual (En-Vi) Code-switching**. | |
| > [!IMPORTANT] | |
| > **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: | |
| [](https://buymeacoffee.com/pnnbao) | |
| --- | |
| ## 🔥 Quick Start (Web UI) | |
| ```bash | |
| 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 | |
| ``` | |
| --- | |
| ## 📦 Using Python SDK (vieneu) | |
| Install the SDK to integrate VieNeu-TTS-0.3B into your research or applications: | |
| ```bash | |
| # 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 | |
| ```python | |
| from vieneu import Vieneu | |
| # Initialize in Standard mode (Default - Highest quality) | |
| tts = Vieneu(emotion="natural") # emotion="natural" (giọng tự nhiên - mặc định) hoặc "storytelling" (giọng kể chuyện) | |
| # 1. Simple synthesis (uses default Northern Female voice 'Trúc Ly') | |
| text = "Chào bạn. Tôi là VieNeu-TTS, tôi có thể giúp bạn đọc sách, làm chatbot thời gian thực, thậm chí clone giọng nói của bạn." | |
| audio = tts.infer(text=text) | |
| # Save to file | |
| tts.save(audio, "output_Trúc Ly.wav") | |
| print("💾 Saved to output_Trúc Ly.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") | |
| ``` | |
| ### Remote Mode (Ultra-Fast with LMDeploy Server) | |
| Deploy VieNeu-TTS as a high-performance API Server (powered by LMDeploy) with a single command. | |
| ### 1. Run with Docker (Recommended) | |
| **Requirement**: [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) is required for GPU support. | |
| **Start the Server with a Public Tunnel (No port forwarding needed):** | |
| ```bash | |
| docker run --gpus all -p 23333:23333 -v huggingface_cache:/root/.cache/huggingface pnnbao/vieneu-tts:latest --tunnel | |
| ``` | |
| * **Default**: The server loads the `VieNeu-TTS-v2` model for maximum quality. | |
| * **Tunneling**: The Docker image includes a built-in `bore` tunnel. Check the container logs to find your public address (e.g., `bore.pub:31631`). | |
| ### 2. Using the SDK (Remote Mode) | |
| Once the server is running, you can connect from anywhere (Colab, Web Apps, etc.) without loading heavy models locally. | |
| **Installation**: | |
| ```bash | |
| pip install "vieneu[gpu]" | |
| ``` | |
| **Usage**: | |
| ```python | |
| from vieneu import Vieneu | |
| import os | |
| # Configuration | |
| REMOTE_API_BASE = 'http://your-server-ip:23333/v1' # Or bore tunnel URL | |
| REMOTE_MODEL_ID = "pnnbao-ump/VieNeu-TTS-v2" | |
| # Initialization (LIGHTWEIGHT - only loads small codec locally) | |
| # Default emotion is "natural" (conversational) - set emotion="storytelling" for storytelling mode | |
| tts = Vieneu(mode='remote', api_base=REMOTE_API_BASE, model_name=REMOTE_MODEL_ID, emotion="natural") | |
| 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 (dynamically select second 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 (uses default voice) | |
| 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 | |
| ```bibtex | |
| @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** |