Made myself a text to speech server today: Festival
Posted: 02 May 2015, 19:44
| Well I like the occasional prank...So it has been a dream of mine to SSH into my homebox when I am away and make the computer speak... |
So I installed festival from the repos and happily danced away to my terminal.
Then I wrote my first message to be spoken:
Code: Select all
echo "Hello! Is anyone home? May the force be with you" | festival --ttsand...
Nothing
Ok so I needed a language file too - I found and installed festival-english
Now it should be OK
...and got
Code: Select all
Linux: can't open /dev/dspAh back to the drawing board then.
It turns out that only people with a working text to speech server get it to work right out of the box so here is what I had to do:
- Find
/usr/share/festival/festival.scm and edit it and put these lines at the very bottom:
Code: Select all
(Parameter.set 'Audio_Required_Format 'aiff)
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Command "paplay $FILE --client-name=Festival --stream-name=Speech")This is for people with pulseaudio - like me.
ALSA people can have a look here:
Code: Select all
echo "Hello! Is anyone home? Did you know that bjoernvold.com rocks?" | festival --tts ...and
SUCCESS!
My speakers announced the message
PS: on some distros the file to edit might be ~/.festivalrc
The syntax is easy
echo "whatever you want to say" | festival --tts
PS on Mageia a simple
Code: Select all
sudo urpmi festivalInstall it at you are good to go with this:
Code: Select all
echo hello $USER you are super awesome i am your processor | festival --tts In Centos it is even simpler:
Code: Select all
sudo yum install festival No questions asked, and it comes with a sexy female voice

In Debian 8 everything works right out of the box after a:
Code: Select all
sudo apt-get install festivalIt looks like my trouble shooting above is mostly for Arch based distros.