Skip to content
Phạm Nam

Search

Type a keyword to search the posts.

Go back
en

VieNeu-TTS: Local Vietnamese TTS, 3-Second Voice Clone

VieNeu-TTS v3 Turbo is free, open-source Vietnamese TTS that runs locally, clones a voice from a 3–8 second clip, and offers an OpenAI-compatible API.

9 min read—

Illustration of VieNeu-TTS v3 Turbo — local Vietnamese text-to-speech with voice cloning from a 3–8 second clip

VieNeu-TTS v3 Turbo — Local Vietnamese TTS With 3-Second Voice Cloning

Your 20-minute YouTube video is ready — script and visuals done, only the voiceover remains. You paste the script into a foreign cloud TTS, and the voice sounds like a foreigner learning to read Vietnamese: tones in the wrong places, English words mid-sentence pronounced awkwardly. The paid plan bills per character.

Or your boss wants a spoken announcement inside an internal app, on one condition: the data must never leave the company’s servers. Every cloud TTS is disqualified, and local engines sound like robots.

VieNeu-TTS v3 Turbo answers exactly those two pains: open-source Vietnamese TTS, trained from scratch for Vietnamese, cloning a voice from a 3–8 second clip, with an OpenAI-compatible API. This article covers v3 Turbo only (v4 is proprietary, available only through the paid vieneu.io/API).

What Is VieNeu-TTS?

VieNeu-TTS is a project by Phạm Nguyễn Ngọc Bảo, repo pnnbao97/VieNeu-TTS, Apache-2.0, 3,381 stars and 1,028 forks. The author says the model was trained from scratch on roughly 10,000 hours of bilingual English–Vietnamese audio.

Most open-source TTS engines were built for English; VieNeu-TTS is trained from scratch for Vietnamese instead — native voices across all three regions, and 48 kHz output audio, double the 24 kHz of v2.

Who should use it: developers building voice apps, Vietnamese podcasts or audiobooks; sysadmins and self-hosters who need an internal TTS API instead of ElevenLabs cloud. Who should not: anyone who wants top commercial voice quality without running anything themselves, or who needs v4 features.

Compared with v2, v3 Turbo raises audio from 24 kHz to 48 kHz, adds 23–25 preset voices depending on the SDK version (README: 25; SDK 3.7.1 model card: 23), clones a voice from a 3–8 second clip, and adds experimental emotion cues [cười], [thở dài], [hắng giọng]. v3 Nano is a preview for weak machines: about 3 times faster on CPU, but only 24 kHz, with lower quality on English and mixed English–Vietnamese sentences.

VieNeu-TTS Architecture — How Text Becomes 48 kHz Speech

flowchart TB
    S["Serving layer — Web UI :7860 · SDK vieneu · Docker api-gpu/cpu · POST /v1/audio/speech"]
    A["Text VI / EN + emotion cues [cười] [thở dài] [hắng giọng]"]
    B["Phonemizer sea-g2p"]
    R["Reference clip 3–8 seconds"]
    Dn["Auto-denoise"]
    Sp["Speaker embedding"]
    C["TTS backbone ~131M — trained from scratch, ~10,000 hrs EN–VI"]
    G["Codec MOSS-Audio-Tokenizer-Nano"]
    E1["ONNX Runtime engine — CPU, torch-free"]
    E2["PyTorch CUDA engine — GPU"]
    O["Audio 48 kHz (Turbo) / 24 kHz (Nano)"]
    S --> A
    A --> B --> C
    R --> Dn --> Sp --> C
    C --> G --> O
    C -.-> E1
    C -.-> E2

The sea-g2p phonemizer converts Vietnamese/English text into phonemes. The core is a TTS backbone of about 131M parameters, which takes the phonemes plus a speaker embedding and decodes them through the MOSS-Audio-Tokenizer-Nano codec into 48 kHz audio. The cloning branch feeds a speaker embedding from a 3–8 second clip into the backbone — without retraining the model. The same model runs on two runtimes: ONNX Runtime on CPU, needing no torch, and PyTorch + CUDA on NVIDIA GPUs.

Four access routes: the Gradio Web UI at http://127.0.0.1:7860, the Python SDK pip install vieneu (v3 Turbo by default), Docker profiles api-gpu / api-cpu, and the OpenAI-compatible POST /v1/audio/speech endpoint with streaming. Dubbing/Lecture/TikTok Reel/Audiobook exist only in the official app. One limit before deploying: int8 on CPU needs VNNI (AVX-512 VNNI or AVX-VNNI); older CPUs running int8 can produce broken audio.

How to Install VieNeu-TTS

System requirements: Python and uv (or pip). CPU works via ONNX Runtime; GPU needs NVIDIA + CUDA.

Method 1 — Windows installer: download the standalone installer at vieneu.io/#/download — no uv, no repo clone needed.

Method 2 — Install from source with uv:

git clone https://github.com/pnnbao97/VieNeu-TTS.git
cd VieNeu-TTS
uv sync            # CPU, torch-free (ONNX Runtime)
uv sync --extra cuda   # GPU (PyTorch + CUDA)
uv run vieneu-web

If you do not have uv yet, install it with powershell -c "irm https://astral.sh/uv/install.ps1 | iex" (Windows) or curl -LsSf https://astral.sh/uv/install.sh | sh (Linux/macOS).

Method 3 — Python SDK. No repo clone needed:

pip install vieneu

On Linux GPU, use pip install "vieneu[cuda]"; on Windows, install CUDA torch first:

pip install torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
pip install "transformers==4.57.6"
pip install vieneu

Method 4 — Docker API server. Run from the cloned repo; the GPU profile needs the NVIDIA Container Toolkit:

docker compose -f docker/docker-compose.yml --profile api-gpu up   # GPU
docker compose -f docker/docker-compose.yml --profile api-cpu up   # CPU, torch-free

The server listens at http://localhost:8000.

Verify the installation — all three steps before concluding “it is installed”: (1) open http://127.0.0.1:7860 and synthesize a test Vietnamese sentence; (2) run the minimal SDK code below and check output.wav is 48 kHz; (3) call the API and check it returns an audio stream with status 200:

curl -X POST http://localhost:8000/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{"model": "vieneu-v3-turbo", "input": "Xin chào, đây là VieNeu-TTS chạy local.", "voice": "Mai Anh", "response_format": "wav"}' \
  --output test.wav

Common Errors and Fixes

ErrorCauseFix
Noisy, distorted audio with int8CPU has no VNNIDrop precision="int8", use the default fp32
uv sync --extra cuda failsMissing CUDA/driver, or wrong torch installInstall the correct CUDA torch version first; if that fails, fall back to the CPU uv sync build
API returns 429Exceeded concurrent streams (default 16 on GPU, 1 on CPU)Raise the limit if the hardware allows, or queue requests

How to Use VieNeu-TTS

Web UI and preset voices: pick a preset voice by region and tone, enter text, choose Turbo or Nano, then export 48 kHz audio.

Clone a voice from a 3–8 second clip: prepare a clear, low-noise clip, 3–8 seconds long — clone quality depends heavily on it.

from vieneu import Vieneu

vieneu = Vieneu()  # Mặc định = v3 Turbo, 48 kHz

audio = vieneu.infer(
    "Đây là giọng được nhân bản tức thì.",
    ref_audio="my_voice.wav",   # clip tham chiếu 3–8 giây
    denoise=True,               # mặc định; False nếu clip đã sạch
)
vieneu.save(audio, "cloned.wav")

Register once, then call it by name:

vieneu.add_voice("Giọng của tôi", "my_voice.wav")
audio = vieneu.infer("Câu này dùng giọng đã lưu.", voice="Giọng của tôi")
vieneu.save_voices()  # lưu lại để session sau vẫn dùng được

Python SDK — minimal example:

from vieneu import Vieneu

vieneu = Vieneu()  # GPU → PyTorch tự động; không GPU → ONNX/CPU

audio = vieneu.infer(
    "[cười] Trời ơi, cái giọng nó tự nhiên mà nó mượt mà dã man, "
    "nghe không khác gì người thật luôn.",
    voice="Phạm Tuyên",
)
vieneu.save(audio, "output.wav")

[cười] is an experimental emotion cue, not read aloud. Batch rendering: infer_batch(); early playback: infer_stream().

OpenAI-compatible API POST /v1/audio/speech: an app already calling OpenAI TTS only needs to change base_url:

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="not-needed")
with client.audio.speech.with_streaming_response.create(
    model="vieneu-v3-turbo",
    voice="Mai Anh",
    input="Xin chào! Đây là chế độ streaming của VieNeu, phát tới đâu nghe tới đó.",
    response_format="pcm",
) as r:
    for chunk in r.iter_bytes(4096):  # s16le 48 kHz mono
        play(chunk)

The server also exposes GET /v1/models, GET /v1/voices, and POST /v1/voices (clone from an uploaded clip).

LoRA fine-tuning on a consumer GPU. LoRA fits when you need one fixed voice and a stable reading style for a long series — about 10–30 minutes of clean audio from one speaker and a GPU with about 6 GB VRAM:

uv sync --extra finetune
uv run python finetune/prepare_dataset.py --dataset-dir finetune/dataset
uv run python finetune/train_lora.py --data finetune/dataset/train.parquet --run my_voice --merge
uv run python finetune/make_voice.py --audio ref.wav --name "My voice" --out finetune/output/my_voice/merged

Point the SDK at the merged folder to use it: Vieneu(mode="v3turbo", backbone_repo="finetune/output/my_voice/merged"). I have not run this part myself.

VieNeu-TTS v3 Turbo Review

Strengths. Native Vietnamese voices across three regions plus English–Vietnamese code-switching, fully local — scripts and voiceovers never leave your machine.

Weaknesses. Real-world voice quality versus ElevenLabs and three-region pronunciation accuracy have no independent verification — no subjective score here.

Performance — author’s figures, not independently verified. September 2026, RTX 3060 12 GB + 12th-gen Core i5. GPU batching: RTF 0.011–0.02, about 50× real time; CPU v3 Turbo fp32: RTF 0.55–0.62, about 2× real time; int8 is faster but needs VNNI. GPU streaming: first audio after about 115 ms, 16 concurrent streams.

Security and operations. The biggest risk of voice cloning is impersonating someone else — which is also why the author keeps v4 proprietary. Only clone voices you have the right to use. The Web UI and API bind localhost by default — never expose them without auth and a reverse proxy. Pin SDK and model versions; do not auto-upgrade production.

Backup and rollback. Before switching a production endpoint, back up the pinned weights and SDK version, registered voices (save_voices()), and reference clips. Keep base_url configurable to roll back to the cloud.

VieNeu-TTS vs. Alternatives in the Same Scope

CriterionVieNeu-TTS v3 TurboVoiceStudio (ElevenLabs local)ElevenLabs cloudHandy (offline STT)
Native Vietnamese voiceYes, 3 regionsElevenLabs voicesHas Vietnamese voicesNo, speech becomes text
Voice cloning3–8 second clipYesYesNot applicable
Runs local/offlineFully localLocalNo, cloudFully local
CostFree, Apache-2.0Free with limitsPaid per characterFree
OpenAI-compatible APIYes, POST /v1/audio/speechNoProprietary APINot applicable

Choose VieNeu-TTS for a native Vietnamese voice running locally at zero cost. Choose VoiceStudio if you already live in the ElevenLabs ecosystem and prioritize English voices — see VoiceStudio, free local ElevenLabs. Handy is not a rival: it turns speech into text — combine the two into a complete local listen-and-speak pipeline, see Handy offline STT.

VieNeu-TTS in Practice

Business and IT departments: one API instance behind an internal reverse proxy; point announcement-reading, IVR, or training apps at the internal base_url.

Homelab: a CPU server with VNNI runs api-cpu; a machine with an NVIDIA card runs api-gpu.

Creators and Vietnamese podcast/audiobook makers: lock the script → pick a preset voice or clone one fixed voice → render by chapter or episode → post-produce as usual. Clone fast to test; once settled, train LoRA.

AI workflows and DevOps: an agent calls POST /v1/audio/speech exactly like OpenAI TTS — no change to existing TTS call code. Pair with Handy STT for a listen-and-speak loop in an internal voice agent.

Lessons Learned

  1. Pick the right version: only v3 Turbo is open — v4 is paid via vieneu.io.
  2. Pick the right engine: an int8 CPU error is different from a CUDA GPU error — identify the path before fixing.
  3. Do not lock in a preset-voice count: 23–25 depending on the SDK version — check with list_preset_voices().
  4. Clone fast to test, LoRA to keep: zero-shot does not replace fine-tuning for a long series.
  5. The OpenAI-compatible API is the biggest asset — keep base_url configurable to roll back to the cloud.
  6. Every RTF/TTFA figure is the author’s — measure again on your real hardware.

Conclusion — Who VieNeu-TTS Fits, Who It Does Not, and the Next Step

VieNeu-TTS v3 Turbo is strongest in three areas: native Vietnamese voices trained from scratch, fully local operation, and an OpenAI-compatible API that drops in for a cloud endpoint. It fits Vietnamese developers, creators, and sysadmins who need local Vietnamese voiceovers, a low budget, and data control — not anyone who wants top commercial voice quality without running anything themselves.

Next step: pick an install method above, synthesize one test Vietnamese sentence, and clone one voice you have the right to use.

Verification Scope

  • Check date: 15/11/2026, from the official README, GitHub API, HF model card, and PyPI — repo, license, stars/forks, install commands, port 7860, API endpoints, Docker profiles, release app-v0.18.25 (12/11/2026), v4 proprietary.
  • Default vs opt-in: Turbo is the SDK default; Nano via mode="v3nano"; int8 via precision="int8"; emotion cues are experimental.
  • Figures are the author’s, not independent benchmarks: 10,000 training hours, RTF 0.011–0.02 (GPU) / 0.55–0.62 (CPU), TTFA ~115 ms, 16 streams, LoRA ~6 GB VRAM, ~131M parameters.
  • Not verified: voice quality versus ElevenLabs, three-region pronunciation accuracy, performance on common CPUs in Vietnam.

References


Related posts

Bình luận

Bình luận được duyệt trước khi hiển thị.

Đang tải bình luận…

Để lại bình luận