Downloads · 30 days
13
4% of all-time downloads
trungnguyentran/vietts-gguf
vietts-gguf is a machine learning model from trungnguyentran. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Vietnamese TTS with instant voice cloning. Runs locally on Apple Silicon (Metal) or NVIDIA GPUs (CUDA) via llama-cpp-python. No cloud API needed.
Downloads · 30 days
13
4% of all-time downloads
All-time downloads
302
Public
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf712 MB · 59%
From the Hugging Face model README
Vietnamese TTS with instant voice cloning. Runs locally on Apple Silicon (Metal) or NVIDIA GPUs (CUDA) via llama-cpp-python. No cloud API needed.
# Install (macOS with Metal)
CMAKE_ARGS="-DGGML_METAL=on" pip install llama-cpp-python
pip install soundfile sea-g2p onnxruntime transformers
# Single sentence
python infer.py --voice nam_long \
--text "Xin chào, tôi là trợ lý AI của bạn."
# Long-form (2 minutes)
python infer.py --voice anh --text-file story.txt \
--target-seconds 120 --out story.wav
# With speaker guard (prevents voice drift in long audio)
pip install resemblyzer librosa
python infer.py --voice nam_long --text-file story.txt \
--target-seconds 120 --speaker-guard --out story.wav
# List all voices
python infer.py --list-voices --voice dummy
| Parameter | Value | Effect |
|---|---|---|
--temperature | 0.55 | Lower = more consistent voice, less expressive |
--top-k | 50 | Token sampling diversity |
--max-new-tokens | 900 | ~18s max per chunk (model's trained limit) |
--context-seconds | 6 | First chunk anchors subsequent chunks |
--spk-threshold | 0.70 | Speaker guard: reject drifted chunks |
--lock-threshold | 0.72 | Voice lock: consistency between chunks |
--retries | 4 | Extra attempts when speaker guard rejects |
| Voice ID | Region | Style | Ref (s) |
|---|---|---|---|
| nam_hung | — | deep, low, narrative | 6.0 |
| nam_duc | north | clear, moderate, narrative | 5.9 |
| nam_khoa | south | bright, high, conversational | 5.3 |
| nam_minh | south | clear, moderate, conversational | 6.0 |
| nam_long | south | warm, steady, conversational | 6.0 |
| nam_khuong | south | clear, moderate | 6.0 |
| nam_son | north | deep, low, narrative | 6.0 |
| nam_hieu | — | bright, high | 6.0 |
| nam_tuan | south | warm, steady | 6.0 |
| nam_vui | south | clear, moderate, conversational | 6.0 |
| anh | south | warm, calm, deep | 6.0 |
| nhat_phong | north | warm, measured, professional | 6.0 |
| uc | south | calm, steady, narrative | 6.0 |
| trung | south | deep, calm, steady | 3.7 |
| trung_caha | south | clear, firm, informative | 3.1 |
| trieu_duong | south | deep, low, narrative | 3.3 |
| tung | south | deep, steady, authoritative | 5.0 |
| ninh | neutral | deep, warm, resonant | 4.7 |
| quang | south | bright, energetic, young | 3.3 |
| Voice ID | Region | Style | Ref (s) |
|---|---|---|---|
| nu_ha | north | clear, moderate, narrative | 6.0 |
| nu_linh | south | high, energetic, conversational | 6.0 |
| nu_phuong | — | clear, moderate | 6.0 |
| nu_hoa | north | warm, low, narrative | 6.0 |
| nu_lan | north | clear, moderate, narrative | 6.0 |
| nu_my | north | high, energetic | 4.7 |
| nu_ngoc | south | bright, expressive, conversational | 6.0 |
| nu_thanh | — | clear, moderate, narrative | 6.0 |
| nu_dieu | north | bright, expressive, narrative | 6.0 |
| nu_thu | north | warm, low, narrative | 6.0 |
| trang | neutral | clear, smooth, direct | 3.4 |
| tham | neutral | soft, intimate, gentle | 6.0 |
| nhu | north | soft, gentle, warm | 6.0 |
| mai | north | bright, cheerful, expressive | 6.0 |
| ngan | neutral | smooth, professional, clear | 6.0 |
| thao | north | clear, bright, energetic | 6.0 |
| hien | north | warm, steady, natural | 6.0 |
| kenh | north | bright, youthful, dynamic | 4.3 |
| huyen | north | warm, expressive, conversational | 5.4 |
For long-form: text is chunked by sentence, first chunk's audio is used as a stable voice anchor for all subsequent chunks. Optional speaker guard (resemblyzer d-vector) rejects chunks that drift from the reference voice.
vietts-qwen3-0.6b-vi-ext-q8_0.gguf # LM weights (Q8_0)
tokenizer.json # Tokenizer
tokenizer_config.json
added_tokens.json
special_tokens_map.json
voices.json # 38 preset voices with codes
infer.py # Inference script
README.md
The mlx-q4/ subfolder contains a 4-bit MLX-quantized model (~395 MB) that runs at ~95 tok/s (1.9x realtime) on Apple M4 -- 35% faster than GGUF Q8 with equal or better audio quality.
| Model | Size | Speed (M4) | Quality |
|---|---|---|---|
| GGUF Q8_0 | 679 MB | ~80 tok/s (1.6x) | Baseline |
| MLX Q4 | 395 MB | ~95 tok/s (1.9x) | Equal or better |
Model weights: research use. Voice presets derived from viVoice (CC-BY-NC-SA-4.0) and ElevenLabs preview clips (subject to their terms).