[Gloucs] text to speech setup

Guy Edwards gloucs at mailman.lug.org.uk
Sun Jun 29 18:39:07 2003


Thought this might be of minor interest. A while back I was trying to
sort out speech on Linux. 

I had another look around and found the Linux Text-To-Speech mini-HOWTO
http://www.tldp.org
which led me to the list of rpms at:
http://rpmfind.net/linux/RPM/Utilities_Speech.html

I located the Festival RPMS on my distro cd and installed them (plus
dependencies). The Mandrake 9.1 RPMs don't seem to include all the
voices so it's got a slight American accent, plus the quality of the
voice is slightly low. To put it into context, Stephen Hawkins famously
uses a text-to-speech program but the voice ("kurt") I've been using is
slightly harder to understand sometimes. Normally you can choose from a
range of voices so maybe I'm just missing an extra RPM. 
http://www.cstr.ed.ac.uk/projects/festival/manual/festival_24.html#SEC98

anyway... examples:
hello world is a bit over used, so lets get a 2001 quote from Goggle:

$> echo "I know you and Frank were planning to disconnect me, and Im
afraid thats something I cannot allow to happen." | festival --tts

festival --tts somefile.txt 
will read out a file for you

I made a quick example script for saying the time
--
#!/bin/bash
# bash script to read the time out every hour
SAYTIME="The time is now `date +%_H` hours and `date +%_M` minutes."
echo $SAYTIME | festival --tts
--

and then put an entry in crontab ($>crontab -e)
0 * * * * /home/hairball/saytime.sh
which will then say the time every hour. 

(You might spot that there's a slight mistake in my thinking there
because my script will always read out the minutes as 00, as it's
activated on the hour in my crontab, but it's just an example.)

0,15,30,45 * * * /home/hairball/saytime.sh
would be a better example (every 1/4 an hour)

-- 
Guy Edwards <guy_j_edwards@hotpop.com>