Want to learn english, but no one wants to speak with you in english? Ever imagine to speak with computer? This script can make your computer speak to you. Note that the script stolen from here. And you will need festival.
#!/bin/sh
#speak.sh
#speak with your computer
#dependency: festival
x=`wc -l $1 |awk '{print $1}'`
y=`expr $x - 1`
i=1
while [ $i -le $y ]
do
echo ">>>`head -$i $1 | tail -1` \n"
head -$i $1 | tail -1 | festival --tts
j=`expr $i + 1`
echo "`head -$j $1 | tail -1`"
i=`expr $i + 2`
read pencet
done
exit 0
and a sample dialog file, save as test.txt:
Hi, whats your name My name is ... how are you? I'm fine, thanks
Give the permission 755 to speak.sh, and run it:
$ speak.sh test.txt
Please send me improvement for the code, and the dialog file too, so I can build a debian package. Or someone can do it for me?
