summaryrefslogtreecommitdiff
path: root/record.sh
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-11-20 13:37:51 +0100
committerBotond Hende <nettingman@gmail.com>2024-11-20 13:37:51 +0100
commit93eb7479e83494690e4eb51f2fb662c651a9fd5e (patch)
treee73548e7df148a66590b23c4a42d2c6dbe6db739 /record.sh
parent528d65c6bd9954cfd96de57de05498dc4c563e0f (diff)
voice control with whisper
Diffstat (limited to 'record.sh')
-rwxr-xr-xrecord.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/record.sh b/record.sh
new file mode 100755
index 0000000..ce866da
--- /dev/null
+++ b/record.sh
@@ -0,0 +1,15 @@
+#!/bin/bash -eu
+
+FIFO_PATH="/tmp/hestia-listening"
+
+if [[ -p "$FIFO_PATH" ]]; then
+ echo >> "$FIFO_PATH"
+else
+ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+ MODULE_NAME=$(basename "$SCRIPT_DIR")
+ cd "$SCRIPT_DIR"
+ source venv/bin/activate
+ cd ..
+ python -m "$MODULE_NAME"
+fi
+