Skip to content

Add Archa TTS (Qwen2.5-0.5B + SNAC) support#26

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-archa-tts-0-5b-th-support
Draft

Add Archa TTS (Qwen2.5-0.5B + SNAC) support#26
Copilot wants to merge 2 commits intomainfrom
copilot/add-archa-tts-0-5b-th-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Integrates YangNobody12/Archa-TTS-0.5B-th — a Thai TTS model built on Qwen2.5-0.5B with LoRA fine-tuning and SNAC 24kHz audio codec — as a new pretrained="archa" option.

New file: pythaitts/pretrained/archa_tts.py

  • Loads Pakorn2112/Archa-TTS-0.5B-th and hubertsiuzdak/snac_24khz from HuggingFace
  • Generates audio tokens autoregressively, decodes 7 tokens per SNAC frame into 24kHz waveform
  • Auto-selects cuda/cpu; bfloat16 on supported GPUs, float32 on CPU
  • Optional noise reduction via noisereduce (degrades gracefully if absent)
  • Supports return_type="file" (WAV) and return_type="waveform" (numpy array)

Updated: pythaitts/__init__.py

  • Adds archa branch in load_pretrained and tts() dispatch
  • Passes device through so callers can select GPU/CPU

Usage

from pythaitts import TTS

tts = TTS(pretrained="archa", device="cuda")
tts.tts("สวัสดีครับ วันนี้อากาศดีมากเลย", filename="output.wav")

# or return numpy waveform
waveform = tts.tts("สวัสดี", return_type="waveform")

Required extras: pip install torch transformers snac soundfile noisereduce scipy numpy

Agent-Logs-Url: https://github.com/PyThaiNLP/PyThaiTTS/sessions/116fd445-02b2-4a3f-a15c-8dc546366fc9

Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for Archa-TTS-0.5B-th to pythaitts Add Archa TTS (Qwen2.5-0.5B + SNAC) support Mar 31, 2026
Copilot AI requested a review from wannaphong March 31, 2026 09:12
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 support YangNobody12/Archa-TTS-0.5B-th

2 participants