From f034d21598b50cbed4e2b653dc9812417a0c5a96 Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 1 Apr 2023 00:25:29 -0600 Subject: [PATCH] this isnt working boo --- server.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server.sh b/server.sh index ccfee61..06a8dc3 100644 --- a/server.sh +++ b/server.sh @@ -70,6 +70,9 @@ _stt() { if [ -n "$PIP" ]; then pip3 install -r ../../git.d/stt.d/rust-whisper.d/requirements.txt fi + for i in $(pactl list short modules | grep secret | cut -f1); do + pactl unload-module $i + done local device=$( pactl list \ | grep Monitor.Source \ @@ -87,13 +90,20 @@ _stt() { echo " device $device" echo "}" ) | sudo tee /etc/asound.conf + + name='my_secret_sink' + if ! pactl list | grep -q $name; then + pactl load-module module-null-sink sink_name=$name channels=1 + pactl load-module module-remap-source master=$name.monitor source_name=shared-$name source_properties="device.description=shared-$name" channels=1 + fi + log launching stt ( export HOTWORDS=../../config.d/mayhem-party.d/v01.yaml@.users[].state.gm.alias export MIC_TIMEOUT=2 export URL=http://localhost:17071/gm/rpc/broadcastSomeoneSaidAlias?message={{hotword}} export HEADERS=say="Eye herd {{hotword}}" - export MIC_NAME=pulse_monitor + export MIC_NAME="${MIC_NAME:-$mic_name}" export MODEL=tiny.en export P=2 python3 ../../git.d/stt.d/rust-whisper.d/hotwords.py