text to speech synthesizer

August 3rd, 2007 mysurface Posted in espeak, festival, fortune, Misc | Hits: 92283 | 12 Comments »

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

Enjoy :)

12 Responses to “text to speech synthesizer”

  1. i did use one time, i liked it. nice tutorial….

    Eliena Andrews
    http://visitformoney.blogspot.com

  2. [...] Bueno, leyendo la infinidad de blogs a lo que estoy suscripto vía RSS, me encuentro con una referencia rápida de comandos simples para aprender como hacer hablar a nuestro GNU/Linux. Esto es realmente útil en servidores sin monitor donde necesitamos de una alerta sonora: [...]

  3. [...] Bueno, leyendo la infinidad de blogs a lo que estoy suscripto vía RSS, me encuentro con una referencia rápida de comandos simples para aprender como hacer hablar a nuestro GNU/Linux. Esto es realmente útil en servidores sin monitor donde necesitamos de una alerta sonora: [...]

  4. [...] [...]

  5. Thanks for reminding me of this beautiful piece of software.
    This article has triggered some flashing ideas in my mind.
    Thank you.

  6. I’ve learned a lot from your blog here,Keep on going,I will keep an eye on it,One more thing,plz visit my websites:chinese specialties

  7. Wow,Fantastic article,it’s so helpful to me,and your blog is very good,I’ve learned a lot from your blog here,Keep on going,my friend,I will keep an eye on it,One more thing,thanks for your post!welcome to ugg shoes.

  8. Its not often that I search for something and actually find useful information glad I found you keep writing!

  9. You have a great sense of writing I must say. Your posts incorporates the reality which are not accessible from anywhere else. I request you humbly please keep writing such remarkable articles.And yes i have tweeted your site linux.byexamples.com .

  10. Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a bit, but instead of that, this is excellent blog. An excellent read. I will definitely be back.

  11. I’m really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one nowadays..

  12. One more issue is that video games can be serious naturally with the major focus on mastering rather than fun. Although, there is an entertainment feature to keep your kids engaged, each game is generally designed to work on a specific set of skills or area, such as mathmatical or research. Thanks for your post.

Leave a Reply