Created
November 29, 2011 21:48
-
-
Save xguse/1406704 to your computer and use it in GitHub Desktop.
Female robot voice that speaks text. Can be used as a tack-on after a long running command to tell you that it has finished. Uses espeak and sox/play. Allows setting volume and repeat value.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
slp=0s | |
rep=0 | |
vol=1 | |
text='Type something Here for me to say.' | |
while getopts 'w:r:v:t:' OPTION | |
do | |
case $OPTION in | |
w) slp="$OPTARG" | |
;; | |
r) rep="$OPTARG" | |
;; | |
v) vol="$OPTARG" | |
;; | |
t) text="$OPTARG" | |
;; | |
?) printf "Usage: %s: [-w wait <$slp>] [-r repeat <$rep>] [-v vol <$vol>] [-t text <$text>] \n" $(basename $0) | |
exit 2 | |
;; | |
esac | |
done | |
sleep $slp | |
echo $text | espeak --stdout -s120 -k18 -a200 -v 'en+f5' --stdin | play -v $vol -t wav - \ | |
chorus 0.4 0.8 20 0.5 0.10 2 -t \ | |
echo 0.9 0.8 33 0.9 \ | |
echo 0.7 0.7 10 0.2 \ | |
echo 0.9 0.2 55 0.5 \ | |
gain 20 \ | |
repeat $rep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment