Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a3b013353 | ||
|
|
3c9a01d3d9 | ||
|
|
8ab758a5cc | ||
|
|
c3130e7a00 | ||
|
|
febed803e9 | ||
|
|
0b55e46bc1 | ||
|
|
af8f75bc7c | ||
|
|
4652ed623b | ||
|
|
7d9bf4133d | ||
|
|
5e21ca40fc | ||
|
|
ac3342790c | ||
|
|
3804232cf1 | ||
|
|
d342023b79 |
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
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
|
||||
|
||||
# sigusr1
|
||||
|
||||
# mayhem-party
|
||||
COPY --from=mayhem-party-builder /bin/mayhem-party /bin/mayhem-party
|
||||
|
||||
# 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
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD ["bash", "/entrypoint.sh"]
|
||||
14
README.md
14
README.md
@@ -1,4 +1,6 @@
|
||||
# Hosting a Mayhem Party
|
||||
# Mayhem Party Venue
|
||||
|
||||
`git submodule init; git pull --recurse-submodules --jobs=10; git submodule foreach git pull origin master`
|
||||
|
||||
# Clients
|
||||
|
||||
@@ -14,7 +16,13 @@
|
||||
sudo apt install mingw-w64
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
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
|
||||
cargo install --path ./
|
||||
```
|
||||
@@ -33,7 +41,7 @@ See `./config.d/rusty-pipe.d`
|
||||
|
||||
## STT
|
||||
|
||||
`cd ./git.d/stt.d/whisper-2023; HOTWORDS=../../../config.d/stt.d/hotwords.txt MIC_TIMEOUT=2 URL=http://localhost:17071/config HEADERS=say='Eye herd {{hotword}}' BODY='[{"op":"replace", "path":"/Quiet", "value":true}]' 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`
|
||||
|
||||
|
||||
@@ -3,11 +3,38 @@ feedback:
|
||||
ttsurl: http://localhost:15002
|
||||
users:
|
||||
bel:
|
||||
player: 2
|
||||
message: its bel
|
||||
meta:
|
||||
lasttsms: 1680052450309
|
||||
lastlag: 676
|
||||
state:
|
||||
player: 2
|
||||
message: ""
|
||||
gm:
|
||||
alias: ""
|
||||
lastalias: ""
|
||||
vote: broadcast
|
||||
broadcast:
|
||||
player: 0
|
||||
message: "8"
|
||||
meta:
|
||||
lasttsms: 0
|
||||
lastlag: 0
|
||||
state:
|
||||
player: 0
|
||||
message: <<SOMEONE SAID "{{HOTWORD}}">>
|
||||
gm:
|
||||
alias: ""
|
||||
lastalias: ""
|
||||
vote: ""
|
||||
zach:
|
||||
meta:
|
||||
lasttsms: 1679978514018
|
||||
lastlag: 0
|
||||
state:
|
||||
player: 0
|
||||
message: ""
|
||||
gm:
|
||||
alias: ""
|
||||
lastalias: ""
|
||||
vote: ""
|
||||
players:
|
||||
- transformation: {}
|
||||
- transformation:
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: bel
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=bel
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=bel
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=bel&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=bel&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: zach
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=zach
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=zach
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=zach&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=zach&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: chase
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=chase
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=chase
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=chase&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=chase&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: mason
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=mason
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=mason
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=mason&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=mason&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: nat
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=nat
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=nat
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=nat&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=nat&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: roxy
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=roxy
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=roxy
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=roxy&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=roxy&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
@@ -6,10 +6,11 @@ streams:
|
||||
gui:
|
||||
user: bill
|
||||
feedback:
|
||||
url: http://mayhem-party.home.blapointe.com:17071?user=bill
|
||||
press: {prefix: "", suffix: ""}
|
||||
release: {prefix: "", suffix: ""}
|
||||
format: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
url_read: http://mayhem-party.home.blapointe.com:17071?user=bill
|
||||
url_say: http://mayhem-party.home.blapointe.com:17071?user=bill&say=
|
||||
url_send: http://mayhem-party.home.blapointe.com:17071/gm/rpc/vote?user=bill&payload=
|
||||
release_prefix: ""
|
||||
format_keys: '{"T":{{ms}},"U":"{{user}}","Y":"{{pressed}}","N":"{{released}}"}'
|
||||
buttons:
|
||||
up: 'w'
|
||||
down: 's'
|
||||
|
||||
Submodule git.d/mayhem-party.d updated: fbf4849517...7f2e25458e
Submodule git.d/rusty-pipe.d updated: 25e99fbf93...787201c3a8
Submodule git.d/stt.d updated: bde26ff2e5...7e2c9d60a1
Reference in New Issue
Block a user