almost
parent
84b7962acc
commit
463314ef2e
|
|
@ -1 +1 @@
|
|||
Subproject commit ad91c4547fdc40c9b1a5b71c80e11460c5ca5268
|
||||
Subproject commit 86b67db949e686ae570b73ede729f4efd3216044
|
||||
40
server.sh
40
server.sh
|
|
@ -25,6 +25,7 @@ cleanup() {
|
|||
pkill -f mayhem-party
|
||||
pkill -f server-vm
|
||||
}
|
||||
cleanup
|
||||
trap cleanup EXIT
|
||||
|
||||
log() {
|
||||
|
|
@ -47,10 +48,7 @@ _mayhem_party() {
|
|||
log launching mayhem-party
|
||||
(
|
||||
source ./config.d/mayhem-party.d/env.env
|
||||
while true; do
|
||||
./git.d/mayhem-party.d/mayhem-party
|
||||
sleep 5
|
||||
done
|
||||
) &> /tmp/mayhem-party.mayhem-party.log &
|
||||
}
|
||||
|
||||
|
|
@ -65,28 +63,8 @@ _tts() {
|
|||
_stt() {
|
||||
log stt
|
||||
pushd ./git.d/stt.d/rust-whisper.d/
|
||||
pip3 install ./requirements.txt
|
||||
popd
|
||||
return 1
|
||||
if ! python3 -m pip show PyAudio; then
|
||||
sudo apt -y install \
|
||||
portaudio19-dev \
|
||||
python3-pyaudio \
|
||||
python3-pip \
|
||||
git \
|
||||
pulseaudio
|
||||
sudo python3 -m pip install --no-cache-dir \
|
||||
git+https://github.com/openai/whisper.git \
|
||||
soundfile \
|
||||
PyAudio \
|
||||
SpeechRecognition \
|
||||
PyYAML
|
||||
fi
|
||||
pip3 install -r ./requirements.txt
|
||||
log launching stt
|
||||
(
|
||||
export HOME="$PWD/mnt.d/stt.d"
|
||||
mkdir -p "$HOME"
|
||||
cd "$HOME"
|
||||
local device=$(
|
||||
pactl list \
|
||||
| grep Monitor.Source \
|
||||
|
|
@ -104,19 +82,21 @@ _stt() {
|
|||
echo " device $device"
|
||||
echo "}"
|
||||
) | sudo tee /etc/asound.conf
|
||||
cd ../../git.d/stt.d/whisper-2023
|
||||
export HOTWORDS=../../config.d/mayhem-party.d/v01.yaml@.users[].state.gm.alias
|
||||
(
|
||||
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 MODEL=tiny.en
|
||||
export DEBUG=true
|
||||
while true; do
|
||||
export MODEL=tiny.en
|
||||
export P=2
|
||||
python3 ./hotwords.py
|
||||
sleep 5
|
||||
done
|
||||
) &> /tmp/mayhem-party.stt.log &
|
||||
popd
|
||||
}
|
||||
|
||||
_snap() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue