- เพียงเข้าไปที่ https://github.com/natchaipon/text_to_speech_thai แล้วโหลดลงมาที่เครื่อง
- กดคลิก TTS_THAI.reg เพื่อติดตั้ง
- ให้ไปที่ All Settings -> Time & Language -> Speech ให้ Add voice ภาษาไทย

- สั่ง pip install pyttsx3
- ลองรัน text_to_speech_th.py
การใช้งาน
ตามตัวอย่างของไฟล์ text_to_speech_th.py สามารถเปลี่ยนข้อความ ตามengine.say('กินข้าวหรือยัง')ปรับความเร็วได้ตาม
engine.setProperty('rate', 120) ยิ่งมากยิ่งเร็วและความดังของเสียง ตาม
engine.setProperty('volume', 0.9) โดยความดังอยู่ในช่วง 0 - 1ขอขอบคุณ @natchaipon ใน GitHub ด้วยนะครับ

0 ความคิดเห็น:
แสดงความคิดเห็น
แสดงความคิดเห็นได้ครับ :)