diff options
Diffstat (limited to 'god/ivan/naturalvoices_cached.sh')
| -rwxr-xr-x | god/ivan/naturalvoices_cached.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/god/ivan/naturalvoices_cached.sh b/god/ivan/naturalvoices_cached.sh new file mode 100755 index 00000000..93ac1911 --- /dev/null +++ b/god/ivan/naturalvoices_cached.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# The cached version of naturalvoices +# This should prevent us from being pwned again ... + +. ../../util/lib/naturalvoices/att.sh + +: ${1?what to say?Please provide text as parameter.} + +text=$(echo $* | sed -e 's/ /+/g' -e 's/\//%2F/g') +voice="${voice:-klara}" + + +CACHE_DIR="${CACHE_DIR:-/tmp/ivan-speech}" +mkdir -p "$CACHE_DIR" +OUTFILE="$CACHE_DIR/${voice}_${text}.wav" + + +if [ ! -e $OUTFILE ] ;then + echo "Downloading $OUTFILE" + get_tts "$text" +else + echo "using cached version of $OUTFILE" +fi + +play_file "$OUTFILE" |
