From b2654a10b29638866b3f12f55d84677535d9de65 Mon Sep 17 00:00:00 2001 From: bel Date: Tue, 28 Mar 2023 19:57:45 -0600 Subject: [PATCH] IT RUNS DOCKER but stt accepts emptystrings and doesnt mount and those are bad --- .gitignore | 3 +++ Dockerfile | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e69de29..1d4632c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +/mnt.d +**/*.sw* +**/__pycache__ diff --git a/Dockerfile b/Dockerfile index 40960c6..8e0575b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,17 +24,24 @@ RUN \ soundfile \ PyAudio \ SpeechRecognition +RUN python3 -m pip install PyYAML +RUN apt install -y pulseaudio +COPY ./git.d/stt.d/ /stt.d/ # sigusr1 # mayhem-party COPY --from=mayhem-party-builder /bin/mayhem-party /bin/mayhem-party +# configs +COPY ./config.d/ /config.d/ + # entrypoint RUN echo 'date' > /entrypoint.sh \ && echo 'cleanup() { kill -9 $(jobs -p); wait; }; trap cleanup EXIT' >> /entrypoint.sh \ - && echo '( while true; do larynx-server; sleep 5; done ) &' >> /entrypoint.sh \ - && echo 'echo running mayhem party; if ! /bin/mayhem-party; then echo mayhem-party failure; exit 1; fi' >> /entrypoint.sh + && echo '( export HOME=/mnt/tts.d; mkdir -p "$HOME"; cd "$HOME"; while true; do larynx-server --port 15002; sleep 5; done ) &' >> /entrypoint.sh \ + && echo '( while true; do cd /stt.d/whisper-2023; HOTWORDS=/config.d/mayhem-party.d/v01.yaml@.users[].state.gm.alias MIC_TIMEOUT=2 URL=http://localhost:17071/gm/rpc/broadcastSomeoneSaidAlias?message={{hotword}} HEADERS=say="Eye herd {{hotword}}" MIC_NAME=pulse python3 ./hotwords.py; sleep 5; done ) &' >> /entrypoint.sh \ + && echo 'echo running mayhem party; source /config.d/mayhem-party.d/env.env; if ! /bin/mayhem-party; then echo mayhem-party failure; exit 1; fi' >> /entrypoint.sh ENTRYPOINT [] CMD ["bash", "/entrypoint.sh"]