Cool Solutions



March 14, 2006 2:35 pm





With festival, you can make your computer talk to you, and read text
documents. From the command line the format for reading the document
looks like this:

festival –tts yourdoc.txt

Introducing festival to your bash scripts can produce some interesting
things. To have what you type speak without having to open and save txt
files, I wrote a quick bash script.

# Festival Talker Program
# Takes input from the keyboard and speaks the text.
# This keeps repeating until you end the program with CTRL + C
# Created by Dave Crouse 01-16-2006

talker ()
echo "         Festival Talker Program";
echo "--------------------------------------------------"; echo "";
echo $WHATYOUTYPED > whatyoutyped
festival --tts  whatyoutyped
shred -u whatyoutyped ; clear

while true

Another script combines Lynx and Festival to speak webpages.

# Written by Crouse @
# Visit specific url with lynx and have festival read it back.
# Works best with pages that are text only, without hyperlinks.
# NOTE: Could create menu system and use sed/awk/grep to clean up pages
before reading
# and allow for the script to loop.
# Very basic bash script that combines the use of lynx and festival

echo "Please enter a url to visit" > enterurlmsg.txt
festival --tts enterurlmsg.txt
read -p "Please enter a url to visit" urltovisit;
lynx -dump $urltovisit > urltemp.txt
festival --tts urltemp.txt
# Remove temp files
rm urltemp.txt
rm enterurlmsg.txt

Now, instead of just a screen with a text, you can have your computer talk to you.

Check out the Festival Speech Synthesis System documentation for additional information.

Centre for Speech Technology Research – University of Edinburgh, UK
David Crouse

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.