Recently I discover a nice software synthesizer called espeak from a post at Fedora Daily Package.
It reminds me that there is another text to speech synthesizer known as festival. Festival speaks english. For example to ask festival to say “Sound check 1 2 3”, you can do this:
echo "Sound check 1 2 3" | festival --tts
To read a file, let say readme.txt:
cat readme.txt | festival --tts
Festival can be run as server and festival client will issue commands to it. Kmouth is a GUI front-end for festival. Besides Kmouth, there are various GUI client available too, check out more from external links at Wikipedia: Festival_Speech_Synthesis_System.
Espeak is another good speech synthesizer. I find espeak convenient to use compare to festival. Let say if you want to say “Hello, how are you?”, you do this
espeak "Hello, how are you?"
To read a file readme.txt,
espeak < readme.txt
More then that, espeak allows you to change the pitch and speed of the speech. I can specified the pitch and speed of speech like this:
espeak -p88 -s100 "Hello, how are you?"
And change the pitch only when the word start with capital letter,
espeak -k30 -s100 "Hello, How are you?"
Besides that, espeak support various languages and various voice. By specified -v you can change the language and voice used. With espeak-data package installed, espeak can support language such as French, Finnish, Greek, German etc. English itself support various accent, such as Scottish English, West Midlands etc. Check out /usr/share/espeak-data/voices to see what voices you have installed.
Say it in French,
espeak -vfr "1 2 3 Bonjour"
You can also asked espeak to read french text files, from there you can learn french.
Tired of the same male voices? Other male and female voice variants are available.
espeak -k20 -ven+12 "My name is Gwen"
Find out more for language and voice here.
Example usage of espeak
Prefer to listen to fortune while reading it?
fortune | tee >(espeak -k20 -ven+12)
Read from HTML pages online, possible? with -m it will ignore markup language tags, such as HTML, XML etc.
wget -qO - http://espeak.sourceforge.net/languages.html | espeak -m -ven+11
Read 1 to 100 in German.
seq 1 100 | espeak -vde