summaryrefslogtreecommitdiffstats
path: root/util/bin
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-11-05 18:14:21 +0100
committermakefu <github@syntax-fehler.de>2013-11-05 18:14:42 +0100
commit628ad2aaa2e207aa2836e9b68f7bfbd890dff766 (patch)
tree1913f767539ee18679f21bbff5ec2ba13f941acd /util/bin
parente71f7dde60f687c3fb037d2e4d2b0ada608e512d (diff)
speech to text: initial commit
Diffstat (limited to 'util/bin')
-rwxr-xr-xutil/bin/mic.stt12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/bin/mic.stt b/util/bin/mic.stt
new file mode 100755
index 00000000..9236f85c
--- /dev/null
+++ b/util/bin/mic.stt
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -efux
+cd $(dirname $(readlink -f $0))
+. ../lib/stt/google.sh
+duration=${1?please provide duration via \$1}
+lang=${lang:-de-DE}
+export lang
+echo "language is set to $lang"
+echo "will record for '$duration' seconds"
+f=$(record_audio ${duration})
+trap 'rm $f' TERM EXIT HUP
+stt "$f"