Views
No views yet
.onnx + .onnx.json), so they
load directly with piper-tts — no separate inference engine needed.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 |
FEMALEV1, MALEV2, MALE-NARRATOR);
the two above were picked because they are 22.05 kHz, matching Piper's own voices.1import wave
2from piper.voice import PiperVoice
3
4voice = PiperVoice.load("th_TH-mms_female-medium.onnx")
5with wave.open("out.wav", "wb") as f:
6 voice.synthesize_wav("สวัสดีครับ นี่คือเสียงตัวอย่าง", f)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.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.