PyThaiNLP / PyThaiNLP/PyThaiTTS
ModuleNotFoundError: No module named 'TTS'
Open
@wannaphong is already working on this.
Since Mar 26, 2026.
- Dominant language
- Jupyter Notebook
- Stars
- 82
- Forks
- 15
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
Code raises error when trying to follow the official snippets.
/Users/sarit/.pyenv/versions/learn_typhoon_ocr/bin/python /Users/sarit/fullstack/learn_typhoon_ocr/test_pythaitts.py
Traceback (most recent call last):
File "/Users/sarit/fullstack/learn_typhoon_ocr/test_pythaitts.py", line 34, in <module>
tts = TTS(pretrained="khanomtan")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sarit/.pyenv/versions/learn_typhoon_ocr/lib/python3.12/site-packages/pythaitts/__init__.py", line 40, in __init__
self.load_pretrained(version=version)
File "/Users/sarit/.pyenv/versions/learn_typhoon_ocr/lib/python3.12/site-packages/pythaitts/__init__.py", line 50, in load_pretrained
from pythaitts.pretrained.khanomtan_tts import KhanomTan
File "/Users/sarit/.pyenv/versions/learn_typhoon_ocr/lib/python3.12/site-packages/pythaitts/pretrained/khanomtan_tts.py", line 12, in <module>
from TTS.utils.synthesizer import Synthesizer
ModuleNotFoundError: No module named 'TTS'
Process finished with exit code 1
import sounddevice as sd
import soundfile as sf
from pythaitts import TTS
tts = TTS()
tts = TTS(pretrained="khanomtan")
file = tts.tts("ภาษาไทย", speaker_idx="Linda", filename="kanontan.wav")
data, samplerate = sf.read(file)
print(f"เล่นจากไฟล์: {file}")
sd.play(data, samplerate)
sd.wait() # รอจนเล่นเสร็จ
pythaitts==0.4.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.