summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-07-30 22:24:39 +0200
committermakefu <github@syntax-fehler.de>2013-07-30 22:24:39 +0200
commitdf850e6a490b2b4c395488bf873d2dd8b556229f (patch)
tree3a511e3f74dfd59d985b7d1fe564a320379b0007
parentd93cc223bba4d1f5a4100ac0967e442ba051e6da (diff)
update ivan
-rwxr-xr-xgod/ivan/ivan13
1 files changed, 11 insertions, 2 deletions
diff --git a/god/ivan/ivan b/god/ivan/ivan
index 5099114a..c28bd3cb 100755
--- a/god/ivan/ivan
+++ b/god/ivan/ivan
@@ -1,5 +1,7 @@
#!/bin/bash
-SATZ_LISTE=/krebs/ivan/satz-liste
+
+cd $(dirname $(readlink -f $0))
+SATZ_LISTE=satz-liste
p="${noise_pitch-10}"
v="${noise_lang-de}"
k="${noise_capital-0}"
@@ -13,6 +15,9 @@ function helpme ()
$0 [-d]
-d -- daemonize
-h -- this help file
+
+ environment:
+ USING_ESPEAK - if set, ivan will talk with espeak
EOF
exit 0
}
@@ -21,7 +26,11 @@ EOF
while true
do
- espeak -v $v -p $p -k $k -a $a -g $g "`shuf \"$SATZ_LISTE\" | tail -1`"
+ if [ -n "${USING_ESPEAK:-}" ];then
+ espeak -v $v -p $p -k $k -a $a -g $g "`shuf \"$SATZ_LISTE\" | tail -1`"
+ else
+ ../../util/bin/naturalvoices2.sh "`shuf \"$SATZ_LISTE\" | tail -1`"
+ fi
[ ! "${1:-}" = "-d" ] && exit 0 # break if not daemonized
sleep $((${RANDOM}%${RND_DELAY}))
done