--- license: apache-2.0 language: - th pipeline_tag: text-to-speech tags: - kokoro - onnx - thai --- # MrJMThaiTTS model files The model files used by the MrJMThaiTTS project (private code repository: `FireH2O/MrJMThaiTTS` on GitHub). A Thai fine-tune of Kokoro-82M, run with onnxruntime on a CPU. | File | Size | What it is | |---|---|---| | `kokoro_thai.fp16w.onnx` | 163 MB | The file `tts.py` uses. Same weights as below, stored as float16 with Cast nodes that onnxruntime folds when it loads the model, so it runs as the same float32 graph at the same speed. Made by `export/compress.py`. | | `kokoro_thai.onnx` | 326 MB | The original, unchanged, from the FastThaiG2P release v0.3.0. | | `thai_som.npy` | 0.5 MB | The built-in voice (one 256-number style vector per input length). Unchanged from the release. | | `config.json` | 3 KB | The model's vocabulary and settings. Unchanged from the release. | ## What the tests show (2026-11-16) - **Runs in real time on a CPU with the smallest footprint of the models we tested**: a 163 MB model file and 1.3 GB of RAM, no graphics card. - **Reads more accurately than Meta MMS-TTS Thai**, the other CPU model with one fixed voice: 5.5 % against 12.2 % reading error on 1,000 Common Voice Thai clips (capped means, see the note under the table). - On that exam its capped reading error (5.5 %) is also below ThonburianTTS (6.0 %), a GPU model. Its plain mean is 12.1 %, because the judge wrote long made-up sentences for two very short clips. - One built-in voice; it does not clone voices. For cloning see [FireH2O/MrJMThaiTTS_CT](https://huggingface.co/FireH2O/MrJMThaiTTS_CT), which also has the lowest reading error of the four models (4.9 %). Not tested here: JaiTTS, Qwen3-TTS and Kaitom Voice, which report lower reading error with larger GPU models. ## Common Voice Thai exam After the short-duration test in the JaiTTS paper ([arXiv 2604.27607](https://arxiv.org/abs/2604.27607)): 1,000 clips from the test split of Common Voice Scripted Speech 27.0 Thai, 1 to 15 s, DNSMOS Pro above 3.9. Reading error is the character error rate of `typhoon-ai/typhoon-whisper-large-v3` on the output. | Model | Reading error (mean) | Reading error (capped) | Clips with no error | Speed (RTF) | Ran on | |---|---|---|---|---|---| | Human recordings | 2.8 % | 2.7 % | 746 | | | | MrJMThaiTTS_CT | 4.9 % | 4.9 % | 686 | 0.45 | CPU | | **MrJMThaiTTS** (this model) | 12.1 % | **5.5 %** | 635 | 0.28 | CPU, 6 threads | | ThonburianTTS (32 steps) | 6.1 % | 6.0 % | 650 | 0.27 | RTX 4060 Ti | | Meta MMS-TTS Thai | 12.5 % | 12.2 % | 337 | 0.19 | CPU | - "Capped" counts a clip at most as 100 %. Two MrJMThaiTTS clips under 1.2 s got transcripts many times longer than the text, which adds 6.6 points to its plain mean. - RTF is computing time divided by audio time; lower is faster. One run per model; no line failed. - Differences from the paper: no denoising of the clips, and a different random draw of 1,000 clips. - The scores file is in the MrJMThaiTTS_CT repo: `exam/cv_exam_summary.json`. ## System requirements Measured on a Ryzen 5 3600 with no graphics card, one 4-second sentence. | | | |---|---| | Graphics card | not needed | | RAM | 1.3 GB peak | | Speed | RTF 0.27 with 6 threads, 0.53 with 2 threads | | Model load | 3.3 s | | Model file | 163 MB (`kokoro_thai.fp16w.onnx`) | Only this one CPU was tested. ## Where the weights come from `kokoro_thai.onnx`, `thai_som.npy` and `config.json` are from https://github.com/awslabs/FastThaiG2P/releases/tag/v0.3.0 (Apache-2.0), a Thai fine-tune of [hexgrad/Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M) (Apache-2.0). The weights were not retrained here; MrJMThaiTTS changes the text front-end and how the audio is cut, not the model. ## Licence The model files are licensed under the Apache License 2.0, the licence of the works they come from; see the `LICENSE` and `NOTICE` files. The project's source code is not in this repo and is all rights reserved. ## SHA-256 ``` a146e80dd142456ef5885a7d44e7155b9b117a633c9810fcf62a33bb69562ba2 kokoro_thai.fp16w.onnx a41a5ea020919e47df03226aebe72a64833bc666dfd6eeca6744d8c248270038 kokoro_thai.onnx bdec2300889bd5db59c81a4f0e1604c78124abf6096d6e84d4db1bbeef122240 thai_som.npy ea8e1a52dd433e27d953255d2bf340fc754ec62a60686d112136c4eee603709f config.json ``` ## Use In a clone of the code repository: `python setup_models.py` downloads these files into `models/fastthaig2p/` and checks them. ## Related model [FireH2O/MrJMThaiTTS_CT](https://huggingface.co/FireH2O/MrJMThaiTTS_CT): a separate Thai model with voice cloning (Kyutai Pocket TTS fine-tune). It uses this project's text front-end.