I would like to start a conversation triggerd from the home automation system.
To achieve this:
1.)A message is published to hermes/tts/say
2.)After a short delay
3.)Rhasspy is waked up by publishing a message to hermes/hotword/porcupine/detected.
4.)A Session is started and an answer/Intent can be spoken
I am not really happy with the achived behavior since 4.) accepts all intents (no intent filter) and the command sequence poorly/not synchronised.
Is there a better way to achive that?
Eg. something like a command startSessionAndWakeUp (with parameters text, intentFilter, âŠ).
Yes that works! Thank you very much for pointing me at this. I overlooked the passage with the type=action for the startSession command. I already tried that command before but only with type=notificationâŠ
I am trying to do the same thing but i am stuck with the intent fillter. Could someone give me an example please. Here is my function what goes with intentFilter: is it the name of the intent or much more?
For me this example is working:
{
âinitâ:
{
âtextâ : âQuestionâ,
âtypeâ: âactionâ,
âcanBeEnqueuedâ: false,
âintentFilterâ: [âPossibleAnswersâ]
},
âsiteIdâ: âsatelitteâ,
âcustomDataâ:null,
âlangâ:null
}
Look how the square brackets are used in the example for the intent filter.
I am getting this error in rhasspy
[ERROR:2022-12-08 04:44:13,942] rhasspydialogue_hermes: parse_mqtt_message (topic=hermes/dialogueManager/startSession)
Traceback (most recent call last):
File â/usr/lib/rhasspy/rhasspy-hermes/rhasspyhermes/client.pyâ, line 303, in parse_mqtt_message
json_payload = json.loads(payload)
File â/usr/lib/python3.7/json/init.pyâ, line 348, in loads
return _default_decoder.decode(s)
File â/usr/lib/python3.7/json/decoder.pyâ, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File â/usr/lib/python3.7/json/decoder.pyâ, line 355, in raw_decode
raise JSONDecodeError(âExpecting valueâ, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)