Raspberry Pi Lesson: Text To Speech


Text to Speech (TTS) adalah library yang untuk mengeluarkan suara. Selain itu terdapat module hardware untuk TTS iaitu Emic2 Text to Speech.

Bagi mempunyai sound, perlu install alsa sound utilities dan mplayer.

sudo apt-get install alsa-utils
sudo apt-get install mplayer

Terdapat beberapa library Text to Speech. Contoh pertama adalah Festival Text to Speech.

sudo apt-get install festival
echo “Hello World” | festival --tts

Contoh kedua adalah Espeak Text to Speech.

sudo apt-get install espeak
espeak -ven+f3 -k5 -s150 "Hello World"

Contoh ketiga adalah Pico Text to Speech.

sudo apt-get install libttspico-utils
pico2wave -w voice.wav "Hello World" && aplay voice.wav

Berikut adalah demo Text to Speech.

Python Source Code

Sertai Telegram Group bagi dapatkan source code


3 responses to “Raspberry Pi Lesson: Text To Speech”

Leave a Reply to Shahrul Cancel reply

Your email address will not be published. Required fields are marked *