06 May 2008

Making your computer to teach you English (or any language)

[Disclaimer: The following doesn't intend to be a clear guide about anything.
This is just a personal log in a public place.]

Sometimes I don't know how to pronounce some weird words in English.

An easy way to know the result, is to use festival to listen whatever you
need.

You can use other programs like espeak or flite as well. Each one has
different options that may suit you or not.

---------------------------

To make festival to play using alsa instead of /dev/dsp add the following to
your ~/.festivalrc file: (you need to install aplay)

;make festival use ALSA output:
(Parameter.set `Audio_Method `Audio_Command)
(Parameter.set `Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")


----------------

Now you can make festival to read you the fortunes:

FF=`fortune -s wisdom` ; echo $FF | cowsay ; echo $FF | festival --tts


-----------------

Similar thing can be done with flite, which has an option '-l' that makes it
recite the text in a loop.

FF=`fortune -s wisdom` ; echo $FF | cowsay ; flite -l -t "$FF"


I couldn't get flite to use ALSA, so I can use flite only when I am not using
the sound on the computer.

Another nice thing:

flite_time `date +%H:%M`

You could use a cron job to tell you the time periodically.

------------------

1 Comments:

Anonymous Anonymous said...

Se me olvido aƱadir este link:

http://www.hackosis.com/index.php/2007/11/24/transform-linux-into-a-talking-companion/

4:35 am  

Post a Comment

<< Home

Too Cool for Internet Explorer