Raspberry Pi: How to make it to speak

How to make your Raspberry Pi Raspbian Wheezy to talk with Festival

I don’t normally use display with my Raspberry Pi and I don’t like led on GPIO so I wanted to make my Raspberry Pi to speak what it was doing. So now it example tells me when it’s ready, when it’s going to start kismet when it’s going to shutdown and so on…

First of all you have to install festival with apt-get:

apt-get -y install festival

After that we want to tell our Raspi which audio output we want to use and here I use 3,5 Jack next to composite output:

amixer cset numid=3 1

Now we can test if it works (plug in speakers/headphones) and then give these commands on commandline:

echo "All your base are belong to us" | festival --tts

This will make festival to say everything between “” thingies.

You can pipe other things to festival if you end your lines with | festival –tts example your computer hostname:

hostname|festival --tts

Example if you for some weird reason want to make your Raspberry Pi to be your “fortune cookie” you can make it speak out output of the fortune command:

apt-get install fortune
/usr/games/fortune|festival --tts

Don’t ask me why you would like to do that but if you want you can =)

1 comment to Raspberry Pi: How to make it to speak

  • Kuydigital

    There is no audio coming out of my raspeberry pi when I use festival but I can play music using mpg123. Please help.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.