Topic: Text to speech?
Would be great if RSS feeds could benefit from text-to-speech. I also imagine this would be a great adaptation for blind users of Chumby.
Has this been explored?
You are not logged in. Please login or register.
chumbysphere forum → Widgets → Text to speech?
Would be great if RSS feeds could benefit from text-to-speech. I also imagine this would be a great adaptation for blind users of Chumby.
Has this been explored?
Chumby's CPU might not be fast enough for text-to-speech. However, my Chumby talks to me. It announces the sender's name and address on all inbox email (i.e. sender is whitelisted, and my address is on the To: header). I do that by invoking mail-announce via procmail on my mail-receiving system. mail-announce uses festival, which is available on major Linux distributions.
#!/bin/bash
#
# mail-announce - use voice synth to report incoming mail
#
# $Id: mail-announce,v 1.16 2007/12/17 19:44:12 esm Exp $
#
###############################################################################
# BEGIN user-customizable section
# Where we send esd output.
#
# servers[0] is always local, and should probably always be defined.
# servers[1] is the thinkpad. Comment it out to stop announcing there.
declare -a servers
servers[0]=''
servers[1]='-s tp'
servers[2]='-s chumby'
# END user-customizable section
##############################################################################
ME=$(basename $0)
die() {
echo "$@" >&2
exit 1
}
# Prevent someone from running this at the command line & hanging forever
test -t 0 && die "$ME: please feed me an email message on stdin"
#
# Extract source address. This converts:
#
# From: John Doe <jdoe@example.com>
# to From: example.com jdoe John Doe
#
# Human audio processing works better that way.
#
from=$(formail -X From: | sed -e 's/[\"\*<>\\]//g' -e 's/^From:\(.*\) \(.*\)@\(.*\)/From: \3: \2; ( ) \1/')
test -z "$from" && die "$ME: No 'From' address found"
# Generate a tmp file into which we copy the festival results
tmpfile=/tmp/$ME.tmp.$$.raw
rm -f $tmpfile
trap 'status=$?; rm -rf $tmpfile && exit $status' 0
trap 'exit $?' 1 2 13 15
# Invoke speech synthesizer to generate an 8KHz sound file...
festival <<EOF
(voice_rab_diphone)
(Parameter.set 'Audio_Command "ln \$FILE $tmpfile")
(Parameter.set 'Audio_Method 'Audio_Command)
(SayText "$from")
EOF
# ...and output the results. Ignore the silly 'opening' nonsense from esdcat.
for server in "${servers[@]}"; do
(esdcat -r 8000 $server $tmpfile 2>&1 |grep -v 'opening socket,') &
done
# Clean up... but wait a bit, in case the esdcat's haven't started yet
sleep 2
rm -f $tmpfile
exit 0
Hmmm... Let's see. Use cron to regularly grab some info online with wget and pipe it into say under OS X. Import the resulting audio into iTunes and add it to a specified stream. Then play that stream on the Chumby via SlimServer.
Edited to add: wget? Nah, use lynx in command line mode.
chumbysphere forum → Widgets → Text to speech?
Powered by PunBB, supported by Informer Technologies, Inc.