Only allow certain intents from sentences.ini for starting a conversation

I’m trying to build some conversation with Rhasspy. So far I have just used simple intents, where I wake Rhasspy up and state my intent to get a reaction. I have set up Rhasspy such that a satellite does wake work recognition but delegates all speech to text and intent recognition tasks to a central server. After the intent is recognized it is sent via MQTT to Node Red where I implement the reaction on it.

Now let’s think about a very simple conversation like this:

Me: “Jarvis, switch off the lights”.
Assistant “Are you sure?”
Me: “Yes”
Assistant: “Ok lights are going off”.

I could model this like this:

[TurnOffLights]
switch off the lights

[ConfirmationAnswer]
(yes|yup|aye){type:yes}
(no|rather not|nope){type:no}

So when the first intent is recognized I can start a session from Node Red and limit the intents to ConfirmationAnswer which is ok. However I would like ConfirmationAnswer to be an intent that you cannot start a conversation with. So something like this should not be possible:

Me: “Hey Jarvis, rather not”
Assistant: “WTF?”

Is there a way to mark intents in sentences.ini such that these intents are not available by default and can only be enabled using startSession/continueSession?

I do not think there is, but you could publish a retained message on
hermes/dialogueManager/configure to disable the required intents.
You could a listener to startSession and endSession to enable/disable the intents.

Maybe that is an idea, but never tried it.

1 Like

Also have a look here:

Maybe we can add some key in the sentences.ini to disable/enable an intent at startup

Maybe we can add some key in the sentences.ini to disable/enable an intent at startup

Might be a good idea to get that solved.

There’s already a suggestion in this direction by @daniele_athome here, and I’d agree with him wrt. to keep additional startup options for intents rather slim (post #8 in this thread).