From c4864a380dcec127066915c9091ee901a8d21c3f Mon Sep 17 00:00:00 2001 From: bel Date: Fri, 31 Mar 2023 21:46:28 -0600 Subject: [PATCH] mature --- git.d/stt.d | 2 +- server.sh | 66 ++++++++++++++++++++++++++--------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/git.d/stt.d b/git.d/stt.d index 599f907..0e6c12a 160000 --- a/git.d/stt.d +++ b/git.d/stt.d @@ -1 +1 @@ -Subproject commit 599f9079d3544c1fbdaf696c0d703432305e7dae +Subproject commit 0e6c12a94f97c63420e25f03f393b54b0a9f5ab0 diff --git a/server.sh b/server.sh index d2295ea..339da28 100644 --- a/server.sh +++ b/server.sh @@ -49,53 +49,53 @@ _mayhem_party() { ( source ./config.d/mayhem-party.d/env.env ./git.d/mayhem-party.d/mayhem-party - ) &> /tmp/mayhem-party.mayhem-party.log & + ) & } _tts() { - log tts + log launching tts ( cd ./git.d/tts.d/larynx.d/ bash ./run.sh - ) &> /tmp/mayhem-party.mayhem-party.log & + ) & } _stt() { log stt pushd ./git.d/stt.d/rust-whisper.d/ - pip3 install -r ./requirements.txt - log launching stt - local device=$( - pactl list \ - | grep Monitor.Source \ - | grep -v hdmi \ - | awk "{print \$NF}" \ - | head -n 1 - ) - ( - echo "pcm.pulse_monitor {" - echo " type pulse" - echo " device $device" - echo "}" - echo "ctl.pulse_monitor {" - echo " type pulse" - echo " device $device" - echo "}" - ) | sudo tee /etc/asound.conf ( export HOME="$PWD/mnt.d/stt.d" mkdir -p "$HOME" - cd "$HOME" - 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 DEBUG=true - export MODEL=tiny.en - export P=2 - python3 ./hotwords.py - ) &> /tmp/mayhem-party.stt.log & + pip3 install -r ./requirements.txt + local device=$( + pactl list \ + | grep Monitor.Source \ + | grep -v hdmi \ + | awk "{print \$NF}" \ + | head -n 1 + ) + ( + echo "pcm.pulse_monitor {" + echo " type pulse" + echo " device $device" + echo "}" + echo "ctl.pulse_monitor {" + echo " type pulse" + echo " device $device" + echo "}" + ) | sudo tee /etc/asound.conf + 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 MODEL=tiny.en + export P=2 + python3 ./hotwords.py + ) & + ) popd }