summaryrefslogtreecommitdiffstats
path: root/util/bin/text2speech.google
diff options
context:
space:
mode:
Diffstat (limited to 'util/bin/text2speech.google')
-rwxr-xr-xutil/bin/text2speech.google10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/bin/text2speech.google b/util/bin/text2speech.google
new file mode 100755
index 00000000..41b4c172
--- /dev/null
+++ b/util/bin/text2speech.google
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -euf
+
+tl=${TL:="en"}
+
+text=$*
+
+url="http://translate.google.com/translate_tts?ie=UTF-8&tl=$tl"
+
+curl -A "Mozilla/5.0" -Ss "$url" --data-urlencode "q=$text"