Emulate say() in Ubuntu
February 1st, 2009 Chris
Tags: howto, linux, tech | Comments Off
Macs come standard with the “say” command, which translates text into speech. It’s pretty easy to do the same thing on linux, using a package called ‘festival’.
Install the app:
Then try it out:
If you get an error message that says “can’t open /dev/dsp”, do the following:
sudo gedit /etc/festival.scm
and paste in the following lines:
(Parameter.set ‘Audio_Method ‘Audio_Command)
(Parameter.set ‘Audio_Required_Format ‘snd)
Now, save the file, and try it again.
I added a little alias, as well. Open up your ~/.bashrc and add these lines:
echo $1 | festival --tts
}
Now the command requires much less typing:
Have fun!
