Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket API doesn't catch intents on base, only on satellite #31

Closed
koenvervloesem opened this issue Apr 27, 2020 · 6 comments
Closed
Labels
question Further information is requested

Comments

@koenvervloesem
Copy link
Member

I have this Node-RED flow gettime-flow.json to handle the GetTime intent.

Last time I tried this flow, this was with a basic setup of one Rhasspy machine and this worked: it could recognize the GetTime intent and reply.

Now I'm testing the same flow on a base/satellite MQTT setup:

  • Base: no audio, intent recognition enabled
  • Satellite: audio, Hermes MQTT to communicate with the base

If I enter the master's WebSocket URL in the websocket in node and I talk to the satellite, the websocket in node doesn't get the recognized intents. Only if I use the satellite's WebSocket URL and talk to the satellite, the recognized intents are coming in.

Of course for this to work I also need the siteID, which is missing (see #30), but this flow doesn't even get the recognized intent.

@synesthesiam
Copy link
Contributor

Pushing a new Docker image with a fix for the missing siteId. Added in the sessionId, customData, and wakewordId for good measure.

The master/satellite issue needs some more thought. The easy fix is to have the master web server automatically listen for siteIds from all satellites. Is there ever a case where a user would not want to do this?

@synesthesiam synesthesiam added the question Further information is requested label Apr 27, 2020
@koenvervloesem
Copy link
Member Author

koenvervloesem commented Apr 27, 2020

I'm not sure about all possible cases (Rhasspy allows a lot ;-)), but the most common case seems to be that the master does intent recognition and the satellites are just audio receivers and players with wake word recognition. So at least for that case, I would expect that listening to the ws://rhasspy:12101/api/events/intent WebSocket URL on the master will also get me the intents originating from sentences spoken on the satellites.

I can't find a case where this behaviour is not wanted. But maybe I'm thinking about this with my MQTT hat on, which I'm much more accustomed to than WebSockets. Maybe @ulno has more experience with this?

@synesthesiam
Copy link
Contributor

I'll plan to add it in for now. We just need to be extra careful about which messages the master web server responds to. Me forgetting small things tends to lead to some service duplicating a response :/

@ulno
Copy link

ulno commented May 20, 2020

tried a new version today in venv and still had no siteId - i am now using change nodes in Node-Red and remember the siteid myself based on teh websocket I am listening to.

@synesthesiam
Copy link
Contributor

I got this working this morning for the wake/text/intent websocket messages. The base station will now check the satellite site ids for the respective wake/ASR/NLU system and forward those events to the base websocket clients.

This seems to be a problem only with MQTT base/satellite set ups. Using remote HTTP works because the base handles all the requests as if they were its own.

@synesthesiam
Copy link
Contributor

Should be in the main Docker image now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants