Kokoro Vietnamese for the web

Browser-ready files for Vietnamese Kokoro text-to-speech, converted from contextboxai/Kokoro-Vietnamese (Apache-2.0). Runs fully client-side with onnxruntime-web (WebGPU, or WASM as a fallback).

File Size What it is
kokoro_vi.web.onnx 83 MB The original ONNX export, constant-folded, with every large weight stored as per-channel int8 + DequantizeLinear
voices/<name>.bin 510 KB each Voice packs: raw little-endian float32, 510 ร— 256 (one style vector per input length)

Voices

diem_trinh, duc_an, duc_duy, hung_thinh, mai_linh, mai_loan, manh_dung, my_yen, ngoc_huyen, phat_tai, storyvert, thanh_dat, thuc_trinh, tuan_ngoc.

Model I/O

  • input_ids int64 [1, n + 2]: token ids from the 114-symbol vocab in the source repo's config.json, padded with 0 at both ends (n โ‰ค 510)
  • ref_s float32 [1, 256]: row min(n, 510) - 1 of the voice pack
  • speed float32 scalar
  • output waveform float32: 24 kHz mono audio

Load it with the session option session.disable_quant_qdq = "1". ONNX Runtime then folds the int8 weights back into fp32 constants at load time: a 4ร— smaller download with unchanged compute.

const session = await ort.InferenceSession.create(modelBytes, {
  executionProviders: ["webgpu", "wasm"],
  extra: { session: { disable_quant_qdq: "1" } },
});

Use onnxruntime-web 1.30 or newer for WebGPU; 1.22 gives wrong output on this model without raising an error.

Text must first be normalized and phonemized to Kokoro's Vietnamese IPA (tones as arrows โ†’ โ†˜ โ†— โ†“). The source repo uses vig2p for this.

Conversion

  1. Constant-fold the graph (the export computes conv weights at runtime via weight norm).
  2. Quantize every fp32 initializer with โ‰ฅ 4096 elements to symmetric per-output-channel int8.
  3. Voice packs: the raw tensor storage of each voicepacks/<name>.pt.

Checked against the original model on CPU: same durations (e.g. 1.62 s, 8.32 s โ†’ 8.28 s, 3.20 s on three test sentences) and near-identical spectra.

License

Apache-2.0, as the source model. All credit for training goes to the authors of contextboxai/Kokoro-Vietnamese and hexgrad/Kokoro-82M.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for relingo/kokoro-vi-web

Quantized
(2)
this model