Mindket

MakHam Thai TTS

Newversion 1 · updated

Overview

Reads Thai text aloud in a female voice with a tiny 8 MB ONNX model that runs on a single CPU thread. For developers who need Thai speech on servers, edge devices or browsers.

MakHam Thai TTS is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python with pip.
  • onnxruntime, soundfile and huggingface_hub.
  • The FastThaiG2P package, which the card installs from its GitHub archive.
Runs in
  • Python with ONNX Runtime, on a CPU.
  • Servers, edge devices and web browsers, since the model is a standalone ONNX file.
  • Windows, macOS or Linux: the download steps run on all three with Python.
Start with
pip install onnxruntime soundfile huggingface_hub

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

MakHam, also called มะขาม, is a family of open Thai text-to-speech models from PyThaiNLP. It joins the multi-voice design of Kokoro-82M with the Paradee 1.1 method, which distills it into a single voice. The result is a model of about 7.88M parameters that handles the five Thai tones and runs from one ONNX file.

Who it suits

Developers who need Thai speech without a GPU, for example on a server, an edge device or in a web page.

IndustryWho uses itHow they use itExample
SoftwareApp developersAdd Thai voice output to apps and botsRead a greeting aloud in a Thai assistant
Edge devicesEmbedded engineersRun speech on small hardware with no GPUSpeak status messages on a CPU-only device
AccessibilityWeb developersRead Thai pages aloud in a browserVoice a news article for listeners

Anyone who needs other languages or several voices can skip it, since this release has one Thai female voice.

Where to use it

  • Python with ONNX Runtime, on a CPU.
  • Servers, edge devices and web browsers, since the model is a standalone ONNX file.
  • Windows, macOS or Linux: the download steps run on all three with Python.
Use caseWhoWhat they get back
Speak Thai textDevelopersA 24 kHz WAV file in a warm female voice
Low-power speechEmbedded engineersFast synthesis on one CPU thread
Browser voiceWeb developersA model small enough to ship to a page

How to set it up

What you need first:

  • Python with pip.
  • onnxruntime, soundfile and huggingface_hub.
  • The FastThaiG2P package, which the card installs from its GitHub archive.
  1. Install the three Python packages with pip.
  2. Install FastThaiG2P from the address the card gives.
  3. Run the Python script below, which downloads the model and its config.
pip install onnxruntime soundfile huggingface_hub

To fetch the repository on its own, run the two Hugging Face commands.

pip install -U huggingface_hub
hf download pythainlp/MakHamTTS

How to use it

The script downloads the INT8 ONNX file and its config, turns Thai text into phoneme IDs with FastThaiG2P, runs the ONNX session and writes a 24 kHz WAV file. The speed input is set to 1.0.

import json
import numpy as np
import onnxruntime as ort
import soundfile as sf
from huggingface_hub import hf_hub_download
from fastthaig2p import G2P, ipa_to_kokoro

# 1. Download model and config from Hugging Face
model_path = hf_hub_download(
    repo_id="pythainlp/MakHamTTS",
    filename="paradee_thai/paradee_thai_int8.onnx"
)
config_path = hf_hub_download(
    repo_id="pythainlp/MakHamTTS",
    filename="paradee_thai/config.json"
)

# 2. Initialize G2P and ONNX session
g2p = G2P()
with open(config_path, "r", encoding="utf-8") as f:
    cfg = json.load(f)

session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])

# 3. Convert Thai text to Kokoro phoneme IDs
text = "สวัสดีค่ะ ยินดีต้อนรับสู่ระบบเสียงสังเคราะห์ภาษาไทย มะขาม"
phonemes = ipa_to_kokoro(g2p.convert(text))
token_ids = [0] + [cfg["vocab"][c] for c in phonemes if c in cfg["vocab"]] + [0]

# 4. Synthesize speech
audio = session.run(None, {
    "input_ids": np.array([token_ids], dtype=np.int64),
    "speed": np.array([1.0], dtype=np.float32),
})[0][0]

# 5. Save output audio (24 kHz)
sf.write("output.wav", audio, 24000)
print("Saved audio to output.wav")
Parts the script uses
ToolWhat it does
hf_hub_downloadFetches the ONNX model and its config
G2P and ipa_to_kokoroTurn Thai text into phonemes and then token IDs
InferenceSessionRuns the ONNX model on the CPU
soundfile writeSaves the audio as a WAV file

Example

You pass a Thai greeting to the script. It converts the text to phoneme IDs, runs the model and saves output.wav at 24 kHz. You play the file to hear the sentence read aloud.

For newcomers and experts

Text-to-speech turns written words into a voice. A good first step is to run the script as it is and listen to the saved file.

The model pairs a TextStudent network with a VDecoder, distilled from a Kokoro base. The female style is baked into the ONNX graph, so no separate voicepack file is needed. Tones are written with explicit symbols in a 115-token vocabulary. The trade-off is a single voice, in exchange for a file of about 8.07 MB for INT8 and much faster CPU speed than the Kokoro base.

  1. Thai text goes into FastThaiG2P
  2. Phonemes map to Kokoro token IDs
  3. The ONNX model generates audio
  4. The audio is saved as a 24 kHz WAV

Good to know

The card compares the INT8 and FP32 builds with the Kokoro-82M Thai base.

CPU speed as a multiple of real time
MakHam INT845 times real time
MakHam FP3228 times real time
Kokoro-82M Thai base4.5 times real time
  • Size: about 8.07 MB for INT8 and 33.17 MB for FP32, against 325.5 MB for the Kokoro base.
  • Training: about 94,200 verified utterances, with automated quality filters.
  • License: apache-2.0
  • Cost to run: no API key, account or paid service named.
  • Data it reaches: files you download from Hugging Face and GitHub, and the text you pass in.
  • Not for: other languages or voices, since this release offers one Thai female voice.

README and files

README

MakHam Thai TTS

Reads Thai text aloud in a female voice with a tiny 8 MB ONNX model that runs on a single CPU thread. For developers who need Thai speech on servers, edge devices or browsers.

Made by pythainlp on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: MakHam, also called มะขาม, is a family of open Thai text-to-speech models from PyThaiNLP. It joins the multi-voice design of Kokoro-82M with the Paradee 1.1 method, which distills it into a single voice. The result is a model of about 7.88M parameters that handles the five Thai tones and runs from one ONNX file.

Who it suits: Developers who need Thai speech without a GPU, for example on a server, an edge device or in a web page.

Industry | Who uses it | How they use it | Example
Software | App developers | Add Thai voice output to apps and bots | Read a greeting aloud in a Thai assistant
Edge devices | Embedded engineers | Run speech on small hardware with no GPU | Speak status messages on a CPU-only device
Accessibility | Web developers | Read Thai pages aloud in a browser | Voice a news article for listeners

Anyone who needs other languages or several voices can skip it, since this release has one Thai female voice.

Where to use it:

  • Python with ONNX Runtime, on a CPU.
  • Servers, edge devices and web browsers, since the model is a standalone ONNX file.
  • Windows, macOS or Linux: the download steps run on all three with Python.
Use case | Who | What they get back
Speak Thai text | Developers | A 24 kHz WAV file in a warm female voice
Low-power speech | Embedded engineers | Fast synthesis on one CPU thread
Browser voice | Web developers | A model small enough to ship to a page

How to set it up: What you need first:

  • Python with pip.
  • onnxruntime, soundfile and huggingface_hub.
  • The FastThaiG2P package, which the card installs from its GitHub archive.
  1. Install the three Python packages with pip.
  2. Install FastThaiG2P from the address the card gives.
  3. Run the Python script below, which downloads the model and its config.
pip install onnxruntime soundfile huggingface_hub

To fetch the repository on its own, run the two Hugging Face commands.

pip install -U huggingface_hub
hf download pythainlp/MakHamTTS

How to use it: The script downloads the INT8 ONNX file and its config, turns Thai text into phoneme IDs with FastThaiG2P, runs the ONNX session and writes a 24 kHz WAV file. The speed input is set to 1.0.

import json
import numpy as np
import onnxruntime as ort
import soundfile as sf
from huggingface_hub import hf_hub_download
from fastthaig2p import G2P, ipa_to_kokoro

# 1. Download model and config from Hugging Face
model_path = hf_hub_download(
    repo_id="pythainlp/MakHamTTS",
    filename="paradee_thai/paradee_thai_int8.onnx"
)
config_path = hf_hub_download(
    repo_id="pythainlp/MakHamTTS",
    filename="paradee_thai/config.json"
)

# 2. Initialize G2P and ONNX session
g2p = G2P()
with open(config_path, "r", encoding="utf-8") as f:
    cfg = json.load(f)

session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])

# 3. Convert Thai text to Kokoro phoneme IDs
text = "สวัสดีค่ะ ยินดีต้อนรับสู่ระบบเสียงสังเคราะห์ภาษาไทย มะขาม"
phonemes = ipa_to_kokoro(g2p.convert(text))
token_ids = [0] + [cfg["vocab"][c] for c in phonemes if c in cfg["vocab"]] + [0]

# 4. Synthesize speech
audio = session.run(None, {
    "input_ids": np.array([token_ids], dtype=np.int64),
    "speed": np.array([1.0], dtype=np.float32),
})[0][0]

# 5. Save output audio (24 kHz)
sf.write("output.wav", audio, 24000)
print("Saved audio to output.wav")
Title: Parts the script uses
Tool | What it does
hf_hub_download | Fetches the ONNX model and its config
G2P and ipa_to_kokoro | Turn Thai text into phonemes and then token IDs
InferenceSession | Runs the ONNX model on the CPU
soundfile write | Saves the audio as a WAV file

Example: You pass a Thai greeting to the script. It converts the text to phoneme IDs, runs the model and saves output.wav at 24 kHz. You play the file to hear the sentence read aloud.

For newcomers and experts: Text-to-speech turns written words into a voice. A good first step is to run the script as it is and listen to the saved file.

The model pairs a TextStudent network with a VDecoder, distilled from a Kokoro base. The female style is baked into the ONNX graph, so no separate voicepack file is needed. Tones are written with explicit symbols in a 115-token vocabulary. The trade-off is a single voice, in exchange for a file of about 8.07 MB for INT8 and much faster CPU speed than the Kokoro base.

Thai text goes into FastThaiG2P
Phonemes map to Kokoro token IDs
The ONNX model generates audio
The audio is saved as a 24 kHz WAV

Good to know: The card compares the INT8 and FP32 builds with the Kokoro-82M Thai base.

Title: CPU speed as a multiple of real time
MakHam INT8: 45 times real time
MakHam FP32: 28 times real time
Kokoro-82M Thai base: 4.5 times real time
  • Size: about 8.07 MB for INT8 and 33.17 MB for FP32, against 325.5 MB for the Kokoro base.
  • Training: about 94,200 verified utterances, with automated quality filters.
  • License: apache-2.0
  • Cost to run: no API key, account or paid service named.
  • Data it reaches: files you download from Hugging Face and GitHub, and the text you pass in.
  • Not for: other languages or voices, since this release offers one Thai female voice.

On Hugging Face, 13 November 2026

  • Task: text to speech
  • Downloads in the last 30 days: 0
  • Likes: 2
  • License: apache-2.0
  • Languages: th
  • Tags: onnx, text-to-speech, kokoro, paradee, pythainlp, thai, audio, speech

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download pythainlp/MakHamTTS

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  6 KB

1 file, 6 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
MakHam Thai TTS This page02—apache-2.0
Paradee-8M v1.2Shares kokoro · paradee · text-to-speech11,40528—apache-2.0
Paradee-8M v1.0Shares kokoro · paradee · text-to-speech4,37470—apache-2.0
Paradee-8M v1.3Shares kokoro · paradee · text-to-speech1,6497—apache-2.0
Ming-3.0-audio-flashShares speech · audio · text-to-speech2,12287128Bmit
AuKShares speech · audio · text-to-speech1,455396—mit
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Developer

See all in Developer

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New