M5-TTS Cantonese voice (ONNX, single-voice, browser-ready)

A fixed-voice Cantonese (yue) packaging of ASLP-lab/M5-TTS-50M-ONNX, built for on-device synthesis in the browser. Ships in wherdr as the m5-canto read-aloud voice, synthesized fully on the phone or laptop β€” no server, no cloud.

What this is

The upstream M5-TTS is a multilingual zero-shot voice-cloning model. This package trades the cloning machinery away for a single fixed voice and a much smaller download:

  • One baked Cantonese voice β€” prompt embeddings, prompt codec tokens and the codec's streaming state are prebaked (prefix_emb.f32, prompt_codes.u16, codec_past.f32, codec_conv.f32, voice_meta.json). The voice-cloning encoder and the non-cached codec variant are not needed and not included.
  • Voice donated by the package author β€” a native Hong Kong Cantonese speaker, released for use in derived works under the same Apache-2.0 terms.
  • Slimmed weights: backbone matmul weights stored as per-channel int8 with fp32 dequantization in-graph (122β†’31 MB), codec decoder weights fp16 with fp32 compute (456β†’228 MB), depth model int8 (147 MB), text embeddings fp16 (133 MB). Total download β‰ˆ 561 MB vs β‰ˆ1.1 GB for the equivalent fp32 single-voice upstream configuration. No integer arithmetic is used anywhere β€” every graph computes in fp32 and runs on stock ONNX Runtime, including onnxruntime-web (wasm + WebGPU).
  • Fixed conditioning lang=Chinese, accent=yue.

Files

file bytes role
backbone.onnx 30,747,515 autoregressive transformer, int8-weight storage
depth_frame.int8.onnx 147,918,011 depth model, one frame per step
codec_decoder_cached.onnx 228,460,974 streaming codec decoder, fp16-weight storage
text_embeddings.f16 133,111,808 raw fp16 embedding table (129,992 Γ— 512)
tokenizer.json 17,524,745 HF tokenizers vocab
voice_meta.json 5,147 prebaked-voice contract (shapes, offsets, prompt text)
prefix_emb.f32 77,824 conditioning prefix embeddings
prompt_codes.u16 1,216 prompt codec tokens
codec_past.f32 2,490,368 codec KV state after the prompt
codec_conv.f32 565,888 codec conv-streaming state after the prompt

Usage

The reference consumer is the m5-tts-worker.js Web Worker in wherdr, which runs backbone/depth on wasm threads and the codec on WebGPU with wasm fallback. Validated end-to-end in Chromium: correct Cantonese synthesis of traditional-input text, with a text front-end that chains OpenCC conversion and a Cantonese rare-character homophone table.

Measured on a 2024 flagship phone (Snapdragon 8 Elite class): hybrid wasm/WebGPU execution at roughly real-time (RTF β‰ˆ 1.0 serial, β‰ˆ0.7 overlapped).

License & attribution

Apache-2.0, same as upstream. Model weights derived from ASLP-lab/M5-TTS-50M-ONNX (Apache-2.0, Β© ASLP-lab). The baked voice is donated by the package author. If you use this package, please credit ASLP-lab for M5-TTS.

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