Inspired by wanting to make strategem commands in Helldivers 2 work with voice.
- Rhasspy: https://github.com/rhasspy/rhasspy - Offline Voice Assistant
- jq: Parses Rhasspy JSON "intents"
- xdotool: Send input to Xorg/Xwayland
- mplayer: Play mp3 audio
A docker-compose.yml
configured to pass pulseaudio input is included in this repo, borrowed from the Rhasspy examples.
Follow the Rhasspy install docs and configure entire setup. Copy relevant sentences.ini
to $HONE/.config/rhasspy/profiles/en
and train Rhasspy.
Copy game scripts into profiles location. They generate a shared command.pipe
FIFO that docker can write to via the command
script. Run listener script on host, i.e. bin/helldivers
- this will then handle Rhasspy intents and send relevant input using xdotool
.
Adding audio was inspired by this fine father on the internet: https://www.youtube.com/watch?v=mdX7gl8o0gA - The audio was generated in the same way using https://elevenlabs.io