Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a36333ef6 | ||
|
|
b2654a10b2 | ||
|
|
2a3b013353 | ||
|
|
3c9a01d3d9 | ||
|
|
8ab758a5cc | ||
|
|
c3130e7a00 | ||
|
|
febed803e9 | ||
|
|
0b55e46bc1 | ||
|
|
af8f75bc7c | ||
|
|
4652ed623b | ||
|
|
7d9bf4133d |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -0,0 +1,3 @@
|
|||||||
|
/mnt.d
|
||||||
|
**/*.sw*
|
||||||
|
**/__pycache__
|
||||||
|
|||||||
47
Dockerfile
Normal file
47
Dockerfile
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
FROM golang:bullseye as mayhem-party-builder
|
||||||
|
|
||||||
|
WORKDIR /mayhem-party.d
|
||||||
|
RUN apt -y update && apt -y install libasound2-dev
|
||||||
|
COPY git.d/mayhem-party.d/ ./
|
||||||
|
RUN go build -o /bin/mayhem-party
|
||||||
|
|
||||||
|
FROM debian:stable-slim
|
||||||
|
|
||||||
|
RUN apt -y update && apt -y upgrade && apt -y install wget
|
||||||
|
|
||||||
|
# tts
|
||||||
|
RUN \
|
||||||
|
wget https://github.com/rhasspy/larynx/releases/download/v1.1/larynx-tts_1.1.0_amd64.deb \
|
||||||
|
&& apt -y install ./larynx-tts_1.1.0_amd64.deb \
|
||||||
|
&& rm ./larynx-tts_1.1.0_amd64.deb
|
||||||
|
|
||||||
|
# https://stackoverflow.com/questions/28985714/run-apps-using-audio-in-a-docker-container
|
||||||
|
# stt #nogo since i need microphone #wait no i dont, i just need to set env or dont start
|
||||||
|
RUN \
|
||||||
|
apt -y install portaudio19-dev python3-pyaudio python3-pip git \
|
||||||
|
&& python3 -m pip install \
|
||||||
|
git+https://github.com/openai/whisper.git \
|
||||||
|
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 '( export HOME=/mnt/tts.d; mkdir -p "$HOME"; cd "$HOME"; while true; do larynx-server --port 15002; sleep 5; done ) &' >> /entrypoint.sh \
|
||||||
|
&& echo '( export HOME=/mnt/stt.d; mkdir -p "$HOME"; cd "$HOME"; 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"]
|
||||||
18
README.md
18
README.md
@@ -1,5 +1,7 @@
|
|||||||
# Mayhem Party Venue
|
# Mayhem Party Venue
|
||||||
|
|
||||||
|
`git submodule init; git pull --recurse-submodules --jobs=10; git submodule foreach git pull origin master`
|
||||||
|
|
||||||
# Clients
|
# Clients
|
||||||
|
|
||||||
## Distribute `rusty-pipe`
|
## Distribute `rusty-pipe`
|
||||||
@@ -14,7 +16,13 @@
|
|||||||
sudo apt install mingw-w64
|
sudo apt install mingw-w64
|
||||||
rustup target add x86_64-pc-windows-gnu
|
rustup target add x86_64-pc-windows-gnu
|
||||||
echo windows
|
echo windows
|
||||||
cargo build --release --target x86_64-pc-windows-gnu && ls target/x86_64-pc-windows-gnu/release/rusty-pipe.exe
|
cargo build --release --target x86_64-pc-windows-gnu
|
||||||
|
rm target/x86_64-pc-windows-gnu/release/rusty-pipe-signed.exe
|
||||||
|
read -p ".crt? " CERT
|
||||||
|
osslsigncode sign \
|
||||||
|
-certs ${CERT%.crt}.crt -key ${CERT%.crt}.key \
|
||||||
|
-n Rusty-Pipe -i https://whois.home.blapointe.com \
|
||||||
|
-in target/x86_64-pc-windows-gnu/release/rusty-pipe.exe -out target/x86_64-pc-windows-gnu/release/rusty-pipe-signed.exe
|
||||||
echo local
|
echo local
|
||||||
cargo install --path ./
|
cargo install --path ./
|
||||||
```
|
```
|
||||||
@@ -27,13 +35,19 @@ See `./config.d/rusty-pipe.d`
|
|||||||
|
|
||||||
# Server
|
# Server
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -f Dockerfile -t mayhem-party-venue . && docker run -p 17070-17071:17070-17071 --rm -it -v /run/user/$UID/pulse/native:/run/user/0/pulse/native -e PULSE_SERVER=unix:/run/user/0/pulse/native -v "$PWD"/mnt.d:/mnt mayhem-party-venue
|
||||||
|
```
|
||||||
|
|
||||||
## TTS
|
## TTS
|
||||||
|
|
||||||
`cd ./git.d/tts.d/larynx.d; bash run.sh`
|
`cd ./git.d/tts.d/larynx.d; bash run.sh`
|
||||||
|
|
||||||
## STT
|
## STT
|
||||||
|
|
||||||
`cd ./git.d/stt.d/whisper-2023; HOTWORDS=../../../config.d/mayhem-party.d/v01.yaml@.users[].state.alias MIC_TIMEOUT=2 URL=http://localhost:17071/gm/rpc/broadcastSomeoneSaidAlias?message={{hotword}} HEADERS=say='Eye herd {{hotword}}' python3 ./hotwords.py`
|
`cd ./git.d/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}}' python3 ./hotwords.py`
|
||||||
|
|
||||||
## `mayhem-party`
|
## `mayhem-party`
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ feedback:
|
|||||||
users:
|
users:
|
||||||
bel:
|
bel:
|
||||||
meta:
|
meta:
|
||||||
lasttsms: 1679974714156
|
lasttsms: 1680052450309
|
||||||
lastlag: 341
|
lastlag: 676
|
||||||
state:
|
state:
|
||||||
player: 2
|
player: 2
|
||||||
message: ""
|
message: ""
|
||||||
@@ -19,7 +19,18 @@ users:
|
|||||||
lastlag: 0
|
lastlag: 0
|
||||||
state:
|
state:
|
||||||
player: 0
|
player: 0
|
||||||
message: "8"
|
message: <<SOMEONE SAID "{{HOTWORD}}">>
|
||||||
|
gm:
|
||||||
|
alias: ""
|
||||||
|
lastalias: ""
|
||||||
|
vote: ""
|
||||||
|
zach:
|
||||||
|
meta:
|
||||||
|
lasttsms: 1679978514018
|
||||||
|
lastlag: 0
|
||||||
|
state:
|
||||||
|
player: 0
|
||||||
|
message: ""
|
||||||
gm:
|
gm:
|
||||||
alias: ""
|
alias: ""
|
||||||
lastalias: ""
|
lastalias: ""
|
||||||
|
|||||||
Submodule git.d/mayhem-party.d updated: 60ed9c1269...7f2e25458e
Submodule git.d/rusty-pipe.d updated: 6f8a76cb13...787201c3a8
Submodule git.d/stt.d updated: 353a613c2b...7e2c9d60a1
Reference in New Issue
Block a user