Is there a way to do this? I have not found much by searching.
The closest thing I found was this thread., but I don’t have a respeaker so I don’t know if it applies.
I simply want to find a way to use a GPIO-connected button as an alternative to the wakeword, while still being able to use the wakeword if desired.
I would appreciate any help with this.
Hi, I’m not much on the hardware side persoanlly, but the code listed by OC2019OC does not look specific to reSpeaker. I assume reSpeaker is just passing all the GPIO pins which it doesn’t use itself through to the RasPi.
The key information is the button_callback(channel) function, which is telling the RasPi what to do when the button is pressed - ie to call the ‘listen-for-command’ on your Rhasspy machine.
Note that both Rhasspy and this little program will have to be running at the same time on your RasPi. For testing you can use two terminal sessions (eg the console plus a SSH terminal), but later will want to run one or both as services or in Docker containers.
You are right, that code worked well with only a few adaptations. Thank you.