summaryrefslogtreecommitdiffstats
path: root/noise/modules/espeak
diff options
context:
space:
mode:
authortv <tv@also>2011-05-29 15:47:21 +0200
committertv <tv@also>2011-05-29 15:47:21 +0200
commite0ec5d2e8560ae433ee677622b24ba82dbe7630b (patch)
treea1fcb14eeafc3df41427896d9b413087d24d71f1 /noise/modules/espeak
parentedaa1d7f7a0ed33c019fce185b8aff7563498b6e (diff)
lowered filesystem hierarchy--everything are modules
Diffstat (limited to 'noise/modules/espeak')
-rwxr-xr-xnoise/modules/espeak34
1 files changed, 34 insertions, 0 deletions
diff --git a/noise/modules/espeak b/noise/modules/espeak
new file mode 100755
index 00000000..97305b5e
--- /dev/null
+++ b/noise/modules/espeak
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+print_var() {
+ echo "$1 = $2"
+}
+
+speak() {
+ p="${noise_pitch-100}"
+ v="${noise_lang-de}"
+ k="${noise_capital-0}"
+ a="${noise_amplitude-100}"
+ g="${noise_gap-1}"
+ if test "$debug" = true; then
+ print_var pitch $p
+ print_var lang $v
+ print_var capital $k
+ print_var amplitude $a
+ print_var gap $g
+ fi
+ if test "$verbose" = true; then
+ echo "espeak: $@"
+ fi
+ #echo "espeak -p \"$pitch\" -v \"$lang\" \"$*\"" >&2
+ (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay -Dplug:dmix)<<EOF
+$*
+EOF
+}
+
+case "$1" in
+ (--help) echo say something with espeak ;;
+ (-d|--debug) shift; debug=true speak "$@";;
+ (-v|--verbose) shift; verbose=true speak "$@";;
+ (*) speak "$@";;
+esac