Instructions to use pnnbao-ump/VieNeu-TTS-0.3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use pnnbao-ump/VieNeu-TTS-0.3B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="pnnbao-ump/VieNeu-TTS-0.3B", filename="VieNeu-TTS-0.3B-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pnnbao-ump/VieNeu-TTS-0.3B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
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 pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
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 pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
Use Docker
docker model run hf.co/pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use pnnbao-ump/VieNeu-TTS-0.3B with Ollama:
ollama run hf.co/pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
- Unsloth Studio
How to use pnnbao-ump/VieNeu-TTS-0.3B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pnnbao-ump/VieNeu-TTS-0.3B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pnnbao-ump/VieNeu-TTS-0.3B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pnnbao-ump/VieNeu-TTS-0.3B to start chatting
- Docker Model Runner
How to use pnnbao-ump/VieNeu-TTS-0.3B with Docker Model Runner:
docker model run hf.co/pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
- Lemonade
How to use pnnbao-ump/VieNeu-TTS-0.3B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pnnbao-ump/VieNeu-TTS-0.3B:Q4_K_M
Run and chat with the model
lemonade run user.VieNeu-TTS-0.3B-Q4_K_M
List all available models
lemonade list
Configuration Parsing Warning:Config file tokenizer_config.json cannot be fetched (too big)
π¦ VieNeu-TTS-0.3B
Overview
VieNeu-TTS-0.3B is an ultra-fast, on-device Vietnamese Text-to-Speech (TTS) model with instant voice cloning.
Unlike the original 0.5B version, this 0.3B model is trained from scratch on the VieNeu-TTS-1000h dataset. It is optimized for extreme efficiency, delivering 2x faster inference while maintaining high speech quality.
Voice Cloning: All model variants (including GGUF) support instant voice cloning with just 3-5 seconds of reference audio.
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
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-0.3B --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-0.3B"
# 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 Variant | Format | Optimization | Quality | Speed |
|---|---|---|---|---|
| VieNeu-TTS-0.3B | PyTorch | GPU (LMDeploy) | βββββ | Ultra Fast |
| VieNeu-TTS-0.3B-q8-gguf | GGUF Q8 | CPU | ββββ | Fast |
| VieNeu-TTS-0.3B-q4-gguf | GGUF Q4 | CPU / Mobile | βββ | Extreme Speed |
π Citation
@misc{vieneutts03b2026,
title = {VieNeu-TTS-0.3B: Ultra-Fast Vietnamese Text-to-Speech trained from scratch},
author = {Pham Nguyen Ngoc Bao},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/pnnbao-ump/VieNeu-TTS-0.3B}}
}
Made with β€οΈ for the Vietnamese TTS community
- Downloads last month
- 39,490
