diff options
author | makefu <root@pigstarter.de> | 2013-12-10 19:49:34 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2013-12-10 19:49:34 +0100 |
commit | e847dd73730eb638d75e2d0cbc36340be7bb517e (patch) | |
tree | 26aa0e70c803ffb4d643e6f63ea05f8336668c57 /.graveyard/noise/modules/espeak | |
parent | 9baf5c9a0a86cb94469eea069e984cc7253635b8 (diff) | |
parent | 93649c0d464de3b62dfd7fbc717386e6905bbbd2 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to '.graveyard/noise/modules/espeak')
-rwxr-xr-x | .graveyard/noise/modules/espeak | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.graveyard/noise/modules/espeak b/.graveyard/noise/modules/espeak new file mode 100755 index 00000000..815d9d99 --- /dev/null +++ b/.graveyard/noise/modules/espeak @@ -0,0 +1,34 @@ +#! /bin/sh + +print_var() { + echo "[35;4m$1[;35m = [32m$2[m" +} + +speak() { + p="${noise_pitch-100}" + v="${noise_lang-de}" + k="${noise_capital-0}" + a="${noise_amplitude-600}" + 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 "[31mespeak -p \"$pitch\" -v \"$lang\" \"$*\"[m" >&2 + (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay)<<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 |