Trà Đá TTS 10M (trada-tts-10m)

Trà Đá is a small Vietnamese text-to-speech model: 9.8M parameters, 24 kHz output, about 16× faster than real time on 4 CPU threads. It supports zero-shot voice cloning from a 5–15 s recording, and runs in PyTorch, in ONNX Runtime (no PyTorch needed) and in the browser with WebGPU, so text and voice never leave the device.

Trà Đá là mô hình đọc tiếng Việt 9,8 triệu tham số, hỗ trợ nhân bản giọng từ 5–15 giây ghi âm. Chạy được bằng PyTorch, ONNX Runtime, hoặc ngay trong trình duyệt bằng WebGPU. Có 4 giọng mẫu tổng hợp và nhân bản giọng từ 5–15 giây ghi âm.

Parameters 9.80M (8.26M text→latent + 1.54M latent→waveform decoder)
Output 24 kHz mono
Input Vietnamese text: numbers, dates, units and currency are normalised automatically
Voices 9 synthetic voices (4 presets + 5 TikTok-style) + zero-shot cloning from a 5–15 s reference
Runtimes PyTorch · ONNX Runtime (CPU/GPU) · ONNX Runtime Web (WebGPU, WASM fallback)
Training data viVoice only (CC BY-NC-SA 4.0)
License weights CC BY-NC-SA 4.0 (non-commercial); code Apache-2.0

Samples

Voice Text Audio
Trà Đá · Nữ Xin chào, mình là Trà Đá, một mô hình đọc tiếng Việt nhỏ gọn… samples/tra-da-nu_chao-hoi.wav
Trà Đá · Nam Sáng nay, ngày 20-11, nhiệt độ ở Hà Nội xuống còn 18 độ C… samples/tra-da-nam_ban-tin.wav
Trà Đá · Nữ ấm Dạ, em chào anh. Em gọi từ bộ phận chăm sóc khách hàng… samples/tra-da-nu-am_tong-dai.wav
Trà Đá · Nam trầm Chiều hôm ấy, mưa rơi lất phất trên con phố nhỏ… samples/tra-da-nam-tram_ke-chuyen.wav

Quick start

git clone https://huggingface.co/tsdocode/trada-tts && cd trada-tts
pip install -r requirements.txt          # ONNX backend; add torch + safetensors for the PyTorch backend
python -m trada_tts "Xin chào, mình là Trà Đá." -o hello.wav --voice tra-da-nu

Python

from trada_tts import TradaTTSOnnx, TradaTTS

tts = TradaTTSOnnx.from_pretrained(".")            # ONNX Runtime, CPU. Or TradaTTS.from_pretrained(".", device="cuda")
audio = tts.synthesize("Giá vàng hôm nay tăng 1,5%, lên 85.000.000 đồng một lượng.", voice="tra-da-nam")
tts.save(audio, "out.wav")                         # 24 kHz

audio = tts.synthesize("Đây là giọng của tôi.", voice="my_voice.wav")   # zero-shot clone from 5-15 s of audio

synthesize(text, voice, cfg_weight=3.0, steps=16, speed=1.0, seed=0, min_syllable_ms=160):

  • voice: a voice id (tra-da-nu, tra-da-nu-am, tra-da-nam, tra-da-nam-tram, review-phim-nam, ke-chuyen-nam, ban-tin-nu, game-nam, ban-hang-nu), a path to a reference recording, or a 192-d speaker embedding.
  • cfg_weight: text guidance. Higher is clearer; lower is looser and more natural, but makes more mistakes.
  • steps: flow-matching steps. 8 is faster and slightly rougher.
  • Long text is split into sentences automatically.
  • min_syllable_ms (default 160): every syllable lasts at least this long. Without it the model sometimes rushes long numbers until syllables get swallowed. On number-heavy text, word errors drop from 10.0% to 6.0%, while ordinary text stays the same and only 2% slower. Set it to 0 to disable.

Phrasing: write it in the text. _ between two words reads them joined (no pause), , gives a short break and . a long one, e.g. "trước 17_giờ 30". The same choice is available per word index:

# word indices: 0 anh, 1 vui, 2 lòng, 3 thanh, ... 7 bảy, 8 giờ
y = tts.synthesize_chunk("anh vui lòng thanh toán trước mười bảy giờ ba mươi.", tts.voices["tra-da-nu"],
                         breaks={8: "join", 3: ","})   # no pause before "giờ"; short pause before "thanh"
  • "join" removes the pause by shortening the next word back to a typical length. It only ever shortens, which keeps the model in range.
  • "," and "." insert a short or long break.

In the web demo, click a word in the result and pick Tự động / _ Liền / , Ngắt ngắn / . Ngắt dài. The mark is written into the text box, which highlights _ and punctuation. A boundary inside a number (e.g. between "năm" and "mươi" of 2.350.000) first writes the number out in words.

In the browser (WebGPU)

python web/serve.py 8000      # then open http://localhost:8000/web/ in Chrome / Edge 113+

The page loads the ONNX files from onnx/ and runs everything client-side: text normalisation, the model, iSTFT (a WGSL compute shader) and voice cloning. It uses WebGPU when available and falls back to multi-threaded WASM. serve.py only adds the COOP/COEP headers that multi-threaded WASM needs; any static host that sends those headers works.

How it works

text → number fixes → Vietnamese normaliser (misaki ViCleaner) → letters + tone stream
     → ConvNeXt text encoder → duration per letter → frame-level condition
     → conditional flow matching, 16 Euler steps, text CFG → 32-d latent @ 25 Hz
     → Vocos-style decoder → magnitude/phase @ 50 Hz → iSTFT → 24 kHz
  • Text: each syllable is spelled as its letters, with tone marks removed. The tone (ngang, huyền, sắc, hỏi, ngã, nặng) goes in a parallel stream with a word-start flag, so the model never has to learn tone-marked letters separately. There is no phonemiser.
  • Speaker: a raw (un-normalised) 192-d CAM++ embedding conditions the encoder, the durations and the flow decoder.

ONNX graphs (onnx/):

File Size I/O
enc.onnx 10 MB ids, tones [1,N] int64, spk [1,192] → h [1,256,N], logdur [1,N]
cfm.onnx 23 MB x [1,32,T], cond [1,256,T], t [1], spk [1,192], w [1] → v [1,32,T] (CFG baked in, one batch-2 pass)
dec.onnx 6 MB z [1,32,T] → mag, phase [1,961,2T]; iSTFT n_fft 1920, hop 480, Hann, center=True
campplus.onnx 28 MB 80-bin Kaldi fbank [1,T,80] → speaker embedding [1,192]; only needed for cloning

scripts/export_onnx.py rebuilds them from trada-tts-10m.safetensors.

Verification:

  • ONNX vs PyTorch: max relative difference ≤ 2e-6 per graph.
  • The JavaScript pipeline vs Python on identical noise: same tokens, waveform correlation 1.000000.
  • WebGPU vs WASM in Chromium: correlation 1.00000.

Evaluation

Result
Syllable error rate, viVoice test (80 utterances, Whisper large-v3-turbo) 16.0%. The real recordings score 18.1% under the same ASR, because the test set is noisy YouTube audio.
Same test, 15M parent model 16.1% (the 10M model is not measurably worse)
DNSMOS OVRL of the samples above 3.22–3.45
CPU speed, ONNX Runtime, 4 threads (server Xeon) RTF 0.063 (16× real time); first sentence in 0.14 s (median)
Browser, WASM, 8 threads (headless Chromium on a shared server) about 2× real time
Zero-shot cloning, unseen speakers speaker similarity 0.71 and 0.60, against 0.89 and 0.86 for real clips of the same speakers (CAM++ cosine)

WebGPU output was checked for correctness (it matches WASM), but its speed was not benchmarked on real GPU hardware. Expect it to be much faster than WASM on a discrete or Apple GPU.

Voices

All nine voices are synthetic. Each is the average speaker embedding of 6–63 viVoice channels of the same gender, so none belongs to a real person. The five "TikTok style" voices blend channels of one content genre: movie reviews, mystery storytelling, news, gaming and product sales. They get the genre's timbre without copying any one creator.

id Name Group Pitch Blend of Max similarity to any single channel
tra-da-nu Trà Đá · Nữ preset 219 Hz 63 channels 0.46
tra-da-nu-am Trà Đá · Nữ ấm preset 207 Hz 7 channels 0.46
tra-da-nam Trà Đá · Nam preset 125 Hz 55 channels 0.57
tra-da-nam-tram Trà Đá · Nam trầm preset 100 Hz 19 channels 0.59
review-phim-nam Review phim · Nam TikTok style 115 Hz 6 channels 0.55
ke-chuyen-nam Kể chuyện · Nam trầm TikTok style 106 Hz 7 channels 0.67
ban-tin-nu Bản tin · Nữ TikTok style 223 Hz 7 channels 0.41
game-nam Game · Nam TikTok style 133 Hz 6 channels 0.55
ban-hang-nu Bán hàng · Nữ TikTok style 236 Hz 6 channels 0.50

For comparison, a real speaker's own clips score 0.73 against that speaker's average (median over channels).

Limitations

  • Long text. The model was trained on 1–15 s utterances. synthesize splits long text at sentence and comma boundaries.
  • Normaliser. It covers common numbers, dates, units, currency and abbreviations. Foreign words and unusual acronyms may be read letter by letter or in Vietnamese spelling.
  • Audio quality. It is limited by the small 32-d codec. It is clean but not studio quality.
  • Cloning. It captures timbre and pitch, not accent or speaking style, and works best with clean single-speaker audio.

License and responsible use

  • Weights (trada-tts-10m.safetensors, onnx/enc|cfm|dec.onnx, voices/) are trained only on viVoice and are released under CC BY-NC-SA 4.0: non-commercial use, with attribution and share-alike.
  • Code is Apache-2.0.
  • Third-party components are listed in NOTICE: CAM++ (Apache-2.0), misaki (Apache-2.0) and ONNX Runtime Web (MIT).

Only clone a voice with the speaker's consent. Do not use this model to impersonate people, for fraud, or to make synthetic speech look like a real recording. Disclose that audio is synthetic when you publish it.

Citation

@misc{tradatts2026,
  title  = {Trà Đá TTS: a 10M-parameter on-device Vietnamese text-to-speech model},
  year   = {2026},
  note   = {https://huggingface.co/tsdocode/trada-tts}
}
Downloads last month
60
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train tsdocode/trada-tts

Space using tsdocode/trada-tts 1