Skip to content

Add MakHamTTS Paradee INT8 model as a built-in pretrained backend - #36

Closed
wannaphong with Copilot wants to merge 2 commits into
mainfrom
copilot/add-makhamtts-models
Closed

wannaphong with Copilot wants to merge 2 commits into
mainfrom
copilot/add-makhamtts-models

Conversation

Copilot AI commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds MakHamTTS integration to PyThaiTTS, using the Paradee Thai INT8 ONNX model with FastThaiG2P phonemization. It also packages the required model artifacts so pretrained="makhamtts" works out of the box.

  • New pretrained backend: makhamtts

    • Added pythaitts/pretrained/makham_tts.py with ONNXRuntime inference flow aligned with MakHamTTS run.py (G2P -> ipa_to_kokoro -> vocab ids -> ONNX).
    • Supports return_type="waveform" and file output.
    • Adds explicit supported voice handling (paradee_thai) with compatibility mapping from legacy defaults.
  • Core TTS integration

    • Extended model loading in pythaitts/__init__.py to support:
      • TTS(pretrained="makhamtts")
      • TTS(pretrained="MakHamTTS")
    • Routed tts() calls to the new backend with correct speaker normalization.
  • Packaged model artifacts

    • Included MakHamTTS assets under pythaitts/pretrained/makhamtts/:
      • paradee_thai_int8.onnx
      • config.json
    • Updated setup.py package data so artifacts are shipped with the package.
  • Docs and focused coverage

    • Updated README model usage examples to include MakHamTTS.
    • Added targeted integration tests in tests/test_makhamtts.py.
from pythaitts import TTS

tts = TTS(pretrained="makhamtts")
wav = tts.tts("สวัสดีค่ะ ยินดีต้อนรับสู่บริการของเรา",
              speaker_idx="paradee_thai",
              return_type="waveform")

Copilot AI linked an issue Nov 3, 2026 that may be closed by this pull request
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add MakHamTTS models to pythaitts Add MakHamTTS Paradee INT8 model as a built-in pretrained backend Nov 3, 2026
Copilot AI requested a review from wannaphong November 3, 2026 17:12
@wannaphong wannaphong closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MakHamTTS

2 participants