I’m using a ReSpeaker 2-Mics Pi HAT as a microphone and was wondering if there is any way to light the LEDs when Rhasspy awakes and to turn them off when it goes to sleep?
Yes
Need rhasspy 2.5
Yes, all via node red. Install mic_hat first.
Use a websocket with: “ws://xxx.xxx.xxx:12101/api/events/log”. That is the event log for Rhasspy. Then use a switch function for wakeup and for when it stops listeneing.
I use a MQTT trigger for SSH commands to the host system (raspbian).
To start the led ring, send the SSH command to the raspberry: cd 4mics_hat && python3 pixels.py
And to stop it, send the SSH command: ps aux | grep -i pixels.py | awk {‘print $2’} | xargs kill -SIGINT
when will it be release 2.5?
That’s interesting as I want to switch a led when Rhasspy / snowboy is listening. But it’s probably not that simple as the websocket sends a loop message:
raspyserver_hermes: Handling TtsSayFinisihed
No way to stop it.