Diese Scripte benötigen eine mprola installation mit den dazugehörigen pho dateinen.
#!/bin/sh if [ -z "$1" ] then while read line do echo $line | txt2speech.sh -play # 2>/dev/null done else echo "$*" | txt2speech.sh ${2:--play} ; # 2>/dev/null fi
txt2speech.sh:
#!/bin/sh #männlich de #VOICE=de2 VOICE=de6 #VOICE= #VOICE= #VOICE= # Weiblich de #VOICE= #VOICE= #VOICE= #VOICE= MBROLA=/usr/local/bin/mbrola DB=/usr/local/txt2speech/$VOICE/$VOICE DATUM=`date '+%d.%m.%y-%H:%M'` if [ $1 = "-play" ] ; then numfilt | txt2pho -m | $MBROLA $DB - /tmp/saying-$DATUM.wav && /usr/bin/esdplay /tmp/saying-$DATUM.wav ; rm -f /tmp/saying-$DATUM.wav # /tmp/saying-$DATUM.wav && /usr/bin/esdplay /tmp/saying-$DATUM.wav ; rm -f /tmp/saying-$DATUM.wav #bplay -b 16 -s 22050 else echo "hallo" # numfilt | txt2pho | $MBROLA $DB - ${1:--} fi;