summaryrefslogtreecommitdiffstats
path: root/util/bin/mic.stt
diff options
context:
space:
mode:
Diffstat (limited to 'util/bin/mic.stt')
-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"