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.
1 2 |
sudo apt-get install alsa-utils sudo apt-get install mplayer |
Terdapat beberapa library Text to Speech. Contoh pertama adalah Festival Text to Speech.
1 2 |
sudo apt-get install festival echo “Hello World” | festival --tts |
Contoh kedua adalah Espeak Text to Speech.
1 2 |
sudo apt-get install espeak espeak -ven+f3 -k5 -s150 "Hello World" |
Contoh ketiga adalah Pico Text to Speech.
1 2 |
sudo apt-get install libttspico-utils pico2wave -w voice.wav "Hello World" && aplay voice.wav |
Berikut adalah demo Text to Speech.
Python Source Code