Adding an extra question

When Rhasspy has recognized an intent, it sometimes happens it still didn’t get it completely right
(e.g. due to some unwanted noise). So it could happen you meant “shut down the light in the bureau” but Rhasspy understood “shut down the light in the bathroom”. For such cases it would be nice if Rhasspy could ask an extra question like “Do you really want me to shut down the light in bathroom” which you can answer with yes or no. Is something like this currently possible?

kind regards,
Hugo

Yes, this is dialogue management. The support is there, you just have to send the right message (hermes/dialogueManager/continueSession) and process the whole flow.

In Rhasspy Hermes App you continue a session by returning a ContinueSession object at the end of your intent handler function, with the “Do you really want…?” question as its text. In the intent_filter argument you restrict intent resolution then to your yes and no intents. And then you add intent handler functions for the yes and no intents that shut down your light (the former) or don’t do anything (the latter).

Yes, this is dialogue management. The support is there, you just have to send the right message ( hermes/dialogueManager/continueSession ) and process the whole flow.

In Rhasspy Hermes App you continue a session by returning a ContinueSession object at the end of your intent handler function, with the “Do you really want…?” question as its text. In the intent_filter argument you restrict intent resolution then to your yes and no intents. And then you add intent handler functions for the yes and no intents that shut down your light (the former) or don’t do anything (the latter).

Can this be done using node-red? Any example flow?

kind regards,
Hugo

Yes this is possible with Node-RED. I don’t have an example flow at hand, but someone else probably has, as I have seen quite some complex Node-RED flows for Rhasspy on the forum.

Maybe some good soul here can point me at such a flow (the simpler the better of course)

kind regards,
hugo

Is dialog managment only possible with the mqtt connection or is there another way ?
I have not found that much info on the dialog managment in general last time i looked at the documentation. Might take a look at adding questions like that to my intent handling once i got a bit more time.

I’m not sure it can be done without MQTT. Have you looked it up in the API reference? Note that you can also use the MQTT messages in the WebSocket API with the /api/mqtt endpoint.