Downloads · 30 days
961
38% of all-time downloads
tranhuyluyen/piper-voices-thai
piper-voices-thai is a text-to-speech model from tranhuyluyen. Use it when you need text read aloud. It is set up for piper. The card lists the license as cc-by-nc-4.0.
Two Thai TTS voices packaged in Piper format (.onnx + .onnx.json), so they load directly with piper-tts — no separate inference engine needed.
Downloads · 30 days
961
38% of all-time downloads
All-time downloads
2.5K
Public
Repo size
572 MB
Likes
0
Public
Click a slice to open those files.
.onnx572 MB · 100%
From the Hugging Face model README
Two Thai TTS voices packaged in Piper format (.onnx + .onnx.json), so they
load directly with piper-tts — no separate inference engine needed.
Piper has no official Thai voice: rhasspy/piper-voices has no th/ directory.
These are format conversions of existing MMS-TTS Thai fine-tunes.
| File | Source model | Sample rate |
|---|---|---|
th_TH-mms_female-medium.onnx | VIZINTZOR/MMS-TTS-THAI-FEMALEV2 | 22.05 kHz |
th_TH-mms_male-medium.onnx | VIZINTZOR/MMS-TTS-THAI-MALEV1 | 22.05 kHz |
Both source repos have 16 kHz siblings (FEMALEV1, MALEV2, MALE-NARRATOR);
the two above were picked because they are 22.05 kHz, matching Piper's own voices.
import wave
from piper.voice import PiperVoice
voice = PiperVoice.load("th_TH-mms_female-medium.onnx")
with wave.open("out.wav", "wb") as f:
voice.synthesize_wav("สวัสดีครับ นี่คือเสียงตัวอย่าง", f)
MMS-TTS and Piper are both VITS, so only the ONNX graph signature and the text representation differ.
input,
input_lengths, scales — wrapping transformers' VitsModel."phoneme_type": "text", where Piper treats each Unicode
codepoint as a phoneme. That matches MMS exactly: a 71-character Thai
vocabulary, no phonemization, no espeak-ng.BOS, PAD, c1, PAD, …, cN, PAD, EOS, while MMS was
trained on intersperse(seq, 0) — 0, c1, 0, …, cN, 0. Mapping BOS and
EOS to empty lists in phoneme_id_map makes the two line up exactly.
PAD maps to [0], MMS's blank token.The MMS vocabulary only contains the digits 0, 1, 2 and 4. Any other
digit is dropped as an unknown character. Spell numbers out as words before
synthesis.
cc-by-nc-4.0, inherited from facebook/mms-tts
(the base model these fine-tunes derive from). Non-commercial use only.