Instructions to use FireH2O/MrJMThaiTTS_CT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pocket-TTS
How to use FireH2O/MrJMThaiTTS_CT with Pocket-TTS:
from pocket_tts import TTSModel import scipy.io.wavfile tts_model = TTSModel.load_model("FireH2O/MrJMThaiTTS_CT") voice_state = tts_model.get_state_for_audio_prompt( "hf://kyutai/tts-voices/alba-mackenna/casual.wav" ) audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.") # Audio is a 1D torch tensor containing PCM data. scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy()) - Notebooks
- Google Colab
- Kaggle
MrJMThaiTTS_CT
A Thai text-to-speech model that speaks in the voice of a short reference clip and runs in real time on a CPU.
It is a Thai fine-tune of Kyutai Pocket TTS: a 6-layer model
(model.safetensors, 424 MB) distilled for 200,000 steps from a 24-layer Thai teacher.
The model reads phonemes (IPA with tones), not Thai script. The Thai text front-end that makes them is included
in frontend/, and ct.py runs the whole chain.
Listen: samples/som.wav is the model speaking in the synthetic Som TTS voice
(reference clip: voices/som_ref.wav).
What the tests show (2026-11-16)
- Lowest reading error of the four open Thai TTS models we tested on 1,000 Common Voice Thai clips: 4.9 % against 6.1 % for ThonburianTTS, 12.1 % for MrJMThaiTTS and 12.5 % for Meta MMS-TTS Thai. Human recordings score 2.8 % with the same judge.
- The only one of the four that clones a voice on a CPU in real time. ThonburianTTS was run on a GPU.
- Its voice similarity is lower than ThonburianTTS on this test: 0.37 against 0.53 (human recordings 0.64). The voice samples in the test are short (3.4 s on average) and from speakers the model never heard.
Not tested here: JaiTTS, Qwen3-TTS and Kaitom Voice. The JaiTTS paper reports lower reading error for them (1.9 % to 3.1 %) on its own draw of Common Voice clips, with larger models that need a GPU.
How to use
Python 3.10 or newer. No graphics card is needed.
git clone https://huggingface.co/FireH2O/MrJMThaiTTS_CT
cd MrJMThaiTTS_CT
pip install -r requirements.txt
python ct.py "สวัสดีครับ วันนี้อากาศดี" --voice voices/som_ref.wav -o hello.wav
python ct.py "ราคา 1,250 บาท" --voice speaker.wav -o out.wav # your own reference clip
python voices/voicepack.py --clone speaker.wav --name speaker # save a voice for fast loading
python ct.py "สวัสดีครับ" --voice voices/saved/speaker.safetensors -o hello.wav
A reference clip of 5 to 10 seconds of clean speech from one speaker works best. Only use a voice with the speaker's explicit consent.
Known limits
- It sometimes stops before the end of a long line. In one of five runs of a 70-character line the last phrase
was missing; the other four were complete.
ct.pysplits text at sentence ends (at most 160 characters each), which keeps lines short. Check the output when every word matters. - Voice similarity is weaker than reading accuracy, most of all with reference clips of a few seconds from a voice unlike the training speakers (see the exam below).
- Output differs a little from run to run; the model samples.
- Thai only. English words inside Thai text are read with a Thai accent.
System requirements
Measured on a Ryzen 5 3600 with no graphics card.
| Graphics card | not needed |
| RAM | 2.1 GB peak while speaking |
| CPU | 2 threads are enough; 4 and 8 threads were no faster |
| Speed | about 1.2 s for 4 s of speech (RTF 0.29) with a loaded voice |
| Model load | 6.5 s |
| Model file | 424 MB |
RAM, threads and load time were measured at training step 147,500; the final model has the same size and shape. Only this one CPU was tested. Disk for the software around it (a CPU build of PyTorch and the front-end) is not measured; about 1 GB is an estimate.
Common Voice Thai exam
After the short-duration test in the JaiTTS paper (arXiv 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,
478 speakers. Each line is spoken with another clip of the same speaker as the voice sample.
Reading error is the character error rate of typhoon-ai/typhoon-whisper-large-v3 on the output. Voice similarity
is the cosine similarity of WavLM-Large speaker embeddings (wavlm_large_finetune.pth) between the output and the
voice sample.
| Model | Reading error | Voice similarity | Speed (RTF) | Ran on |
|---|---|---|---|---|
| Human recordings | 2.8 % | 0.64 | ||
| MrJMThaiTTS_CT (this model) | 4.9 % | 0.37 | 0.45 | CPU |
| ThonburianTTS (32 steps) | 6.1 % | 0.53 | 0.27 | RTX 4060 Ti |
| MrJMThaiTTS | 12.1 % (5.5 % capped) | no cloning | 0.28 | CPU, 6 threads |
| Meta MMS-TTS Thai | 12.5 % | no cloning | 0.19 | CPU |
- Reading error is the mean over clips. "Capped" counts a clip at most as 100 %: on two very short MrJMThaiTTS clips (under 1.2 s) the judge wrote long made-up sentences, which adds 6.6 points to its mean.
- RTF is computing time divided by audio time; lower is faster. For MrJMThaiTTS_CT it includes encoding a new voice sample for every line. With one voice reused it is 0.29 (64-line test below).
- One run per model. No line failed for any model.
- Differences from the paper: no denoising of the clips, and a different random draw (the paper's list of clips is not published). With this setup ThonburianTTS scores 6.1 % and 0.53; the paper reports 6.26 % and 0.48.
- The numbers and how the clips were picked:
exam/cv_exam_summary.json. The Common Voice clips are not in this repo.
64-line test, one voice
64 test lines of chat-style Thai, spoken in the Som TTS voice. Reading error here is the phoneme-level error of a
Thai Whisper model (biodatlab/whisper-th-small-combined), similarity is microsoft/wavlm-base-plus-sv, so the
numbers are not comparable with the exam above. One run per row. Per-line results: gate/student200000/.
| Model | Reading error | Speaker similarity | UTMOS | RTF |
|---|---|---|---|---|
| MrJMThaiTTS_CT (this model) | 0.040 | 0.946 | 3.51 | 0.29 (CPU) |
| Its 24-layer teacher, 250,000 steps | 0.085 | 0.944 | 3.43 | 0.62 |
| MrJMThaiTTS | 0.067 | no cloning | 3.23 | 0.29 (CPU) |
| ThonburianTTS (32 steps) | 0.170 | 0.941 | 3.22 | 0.53 (RTX 4060 Ti) |
Small versions (2026-11-19)
Two smaller models made from the same Thai teacher with Kyutai's recipe for small Pocket TTS models
("The tiny TTS was actually 10x too big", 2026-10-20). They are in small/. The main model above is unchanged.
| Main model | small/15m |
small/7m |
|
|---|---|---|---|
| Numbers in the speaking part (model and decoder) | about 100M | 15.1M | 6.6M |
| File for a saved voice, 16-bit, no voice encoder | 30.2 MB | 13.3 MB | |
File that ct.py loads (32-bit, with the voice encoder) |
424 MB | 99.3 MB | 65.6 MB |
| Reading error, 64-line test | 0.062 | 0.047 | 0.061 / 0.060 |
| Speaker similarity | 0.946 | 0.943 | 0.938 / 0.939 |
| UTMOS | 3.54 | 3.58 | 3.17 / 3.25 |
- The scores are from the 64-line test below (one synthetic voice, chat-style lines), all measured on
2026-11-19 at full precision. One run each for the main model and
small/15m, two runs forsmall/7m. The same model's reading error moves by 2 to 3 points between runs of this test (the main model scored 0.040 on 2026-11-16 and 0.062 on 2026-11-19), so small differences in that column mean nothing. small/7mreads and keeps the voice about as well as the main model, and scores lower on naturalness (UTMOS). In our own listening it was hard to tell from the main model; that is one listener, not a test.small/15mscores like the main model on all three. It has the same small backbone assmall/7mwith the main model's larger sampling head.- Neither small model was run through the Common Voice exam, so the exam results on this page are for the main model only. Voice similarity on short clips from unseen speakers is the main model's weak spot and is not expected to be better here.
- Both use Kyutai's small audio decoder from their English 7M model. On the same frames it scored like the larger decoder on Thai (reading error 0.061 against 0.062, UTMOS 3.56 against 3.54).
- Per-line results:
small/7m/gate/,small/15m/gate/. Samples:small/7m/samples/som.wav,small/15m/samples/som.wav.
Use them with the same code:
python ct.py "สวัสดีครับ วันนี้อากาศดี" --voice voices/som_ref.wav --config small/7m/thai_7m.yaml -o hello.wav
python ct.py "สวัสดีครับ วันนี้อากาศดี" --voice voices/som_ref.wav --config small/15m/thai_15m.yaml -o hello.wav
Measured on a Ryzen 5 3600 with ct.py, one sentence of 5 s: small/7m took 0.69 s (RTF 0.14) with 1.4 GB of
RAM at peak; the main model took 1.36 s (RTF 0.28) with 2.1 GB.
Without Python. model_fp16_no_voice_encoder.safetensors is the same model at 16-bit without the half that
encodes a new voice, for use with a saved voice such as voice_som.safetensors. Kyutai's Rust program
(rust/ in kyutai-labs/pocket-tts) loaded it with these files
unchanged on the same CPU: the 7M file spoke 9 times faster than real time on one thread and 17 times on four,
with about 88 MB of RAM. Two things to know:
- That program does not include the Thai front-end. It must be given the phoneme text that
frontend/modeltext.pymakes, not Thai script, and a config whoseweights_pathnames the 16-bit file. It reads the two paths in the config relative to the folder it is started in. - It uses one fixed random seed. With the default seed some lines got an extra sound before the first word
(reading error 0.095 against 0.059 on 32 lines). Set another seed for each line (
POCKET_TTS_SEED).
Not tested: a phone, a browser, and any CPU other than this one.
Related model
FireH2O/MrJMThaiTTS: a separate Thai model (a Kokoro-82M fine-tune, one built-in voice, no cloning, 163 MB). MrJMThaiTTS_CT uses that project's text front-end.
Files
| File | What it is |
|---|---|
model.safetensors |
the model, 424 MB |
tokenizer.json |
512 phoneme pieces |
thai.yaml |
the inference config |
ct.py, engine/, frontend/, voices/voicepack.py |
the code that runs it (run-only, see CODE_LICENSE) |
requirements.txt |
what to install |
voices/som_ref.wav, samples/som.wav |
a reference clip in the synthetic Som TTS voice, and the model speaking in it |
exam/cv_exam_summary.json, gate/student200000/ |
the test scores |
small/7m/, small/15m/ |
the two small versions: model.safetensors, the 16-bit file without the voice encoder, the config, a saved Som voice, test scores and a sample |
LICENSE, CODE_LICENSE, NOTICE |
licences and credits |
Training
- Teacher: Kyutai's 24-layer English teacher
english_2026-04_24l, text embedding started fresh, 250,000 steps, batch 16 × 4, learning rate 2e-4 constant. - This model: 6 layers, distilled from the 250,000-step teacher, 200,000 steps, batch 64, finished 2026-11-16.
- Small versions (2026-11-19): the teacher was given an output of 64 numbers per frame and trained 12,000 more
steps; the backbone was cut in four steps to 8 layers of width 224 (45,000 steps each, from the teacher's saved
answers on 1.44 million clips);
small/7mthen got a new one-step sampling head of 0.84M numbers (100,000 steps). Kyutai's own schedule is longer (30,000, 100,000 per step and 100,000). Same data as below. - Data: Som TTS (11.8 h, one synthetic voice), Porjai central Thai (250 h), and THAI SER (31.4 h of acted emotions). Common Voice was not used for training, only for the exam.
Licence and rules
- Model files: CC BY-SA 4.0. See
LICENSEfor the full terms, the credit line and the citations. - Run code: all rights reserved. You may run it unmodified with this model; see
CODE_LICENSE. - Rules of use: do not clone or imitate a voice without the speaker's explicit consent, and do not pass generated speech off as a real recording. These are Kyutai's rules for Pocket TTS, which this model is made from.
- Built from: Kyutai Pocket TTS (CC-BY-4.0), Som TTS (
pythainlp/som_tts_dataset, CC-BY-4.0), Porjai (CMKL/Porjai-Thai-voice-dataset-central, CC-BY-SA-4.0) and THAI SER (airesearch/thai-ser, CC-BY-SA-4.0). The share-alike licence of the last two is why the model is CC BY-SA 4.0.
SHA-256
a6ea8714c586cbe5f7f39b68b7db5e0f0cc0f2dc4c088d6bcd756d41e476096b model.safetensors
4e35a2f2d957ed90f143e340c6bb7f91f8e55a3871fcda61a90204f3b990089e small/7m/model.safetensors
90c6ed1fb509e2cfa047a9cef348c5411f3493d0579c1a3ce2d5fafc7f62da8c small/7m/model_fp16_no_voice_encoder.safetensors
45115170620304a1b6a771206592509a895cef061b48e7428ee8d7dd207d2f71 small/15m/model.safetensors
3341295445257db1a94a74714edae4529b31737522bc8792b1d5b3531679f62d small/15m/model_fp16_no_voice_encoder.safetensors
- Downloads last month
- -
Model tree for FireH2O/MrJMThaiTTS_CT
Base model
kyutai/pocket-tts