Romkabouter/ESP32-Rhasspy-Satellite

How to integrate with rhasspy master?

markusressel opened this issue · 1 comments

Hey there, great project!

I just received my Matrix Voice and already tried it out by directly plugging it into a Raspberry Pi 3B+, which did work fine using the official guide.

However, I am not quite sure how I am supposed to configure the rhasspy master to make it communicate with the ESP32 satellite. Is there more documentation on this somewhere other than the Getting started guide?

As I understand it the Matrix is only used as an external microphone and speaker, constantly streaming microphone data via MQTT to rhasspy, is that correct? If so, how can I verify that? From what I can tell the documentation on debugging this whole setup is a little sparse at the moment and I would be very happy to contribute to it when I get this working :)

About my setup:

I have a rhasspy "master" running on a dedicated machine, without speaker or microphones attached. I want to use this master to do all of the work, like detecting the hotword, STT, TTS, dialogue management, etc.

I have successfully flashed the contents of this repo to the Matrix Voice device and it shows a constantly glowing blue ring, which from what I can tell by reading the code means either "WIFI connected" or "Idle", so I guess everything is fine.

On the rhasspy master I have altered my previously working configuration for the Raspberry Pi sattelite (which also ran a rhasspy instance), by enabling the "Audio Recording" component using the "Hermes MQTT" type, enabling the "Wake Word" using the "Porcupine" type as well as "Audio Playing" using the "Hermes MQTT" type. I have left the "Dialogue Management" on "Rhasspy" type, although I am unsure about that one.

Thx for you work!

EDIT:
I am not sure what changed, but it works! 🥳
I guess the question now becomes: Where would be the best place to document this?

The fact that there is a web interface at port 80 was also completely unknown to me before reading about in a comment from some other issue.

#31 seems to contain a basic overview of the correct configuration options.

As I understand it the Matrix is only used as an external microphone and speaker, constantly streaming microphone data via MQTT to rhasspy, is that correct? If so, how can I verify that? From what I can tell the documentation on debugging this whole setup is a little sparse at the moment and I would be very happy to contribute to it when I get this working :)

Yes, that is correct. You can verify it be connection with some other application (I use MQTTfx which has a "scan"function) and see if messages a being publisched to hermes/audioServer/yoursiteID/audioFrame

I have successfully flashed the contents of this repo to the Matrix Voice device and it shows a constantly glowing blue ring, which from what I can tell by reading the code means either "WIFI connected" or "Idle", so I guess everything is fine.

I guess so yes, but the leds are only for WiFi, not for the audioconnection

On the rhasspy master I have altered my previously working configuration for the Raspberry Pi sattelite (which also ran a rhasspy instance), by enabling the "Audio Recording" component using the "Hermes MQTT" type, enabling the "Wake Word" using the "Porcupine" type as well as "Audio Playing" using the "Hermes MQTT" type. I have left the "Dialogue Management" on "Rhasspy" type, although I am unsure about that one.

All settings ok, but I have have change the siteID of the master, you have to put the siteID of the Matrix Voice into the inputboxes "Satellite Id's" in the specific settings. You can connect multiple satellites that way. If you only have 1 device, you can set the siteID of rhasspy to the same as the Matrix Voice and that will work as well :)

I guess the webserver part should be placed somewhere indeed, and it might be a good idea to put some help on Rhasspy as well for starters. If you want to contribute, maybe you can create a section in the readme for this.

Nice you got it working!