snips-issues
snips-issues copied to clipboard
[Feature Request]Call onHotword
We need a way to be able to inject code right after the hotword is detected but before the feedback sound is played, to basically be able to stop it or change it
@Psychokiller1888 would moving the feedback sound handling out of the dialogue and into a separate component be a solution ? I've been toying with the idea for some time (I need to do some test whether that doesn't negatively affect other places in the dialog) This would enable you do disable the built-in feedback compoent and write you own with custom logic
Yep, but letting it by default automatically handeled. The idea would be having the current implementation by default. But be able to deactivate it and when onHotword is triggered send a message on Hermes to play the feedback sound or simply return
Something like
self.mqttClient.message_callback_add('hermes/hotword/alice/detected', self.onHotwordDetected)
....
def onHotwordDetected(self, client, data, msg):
if not self.awake:
return
else:
publish.single('hermes/feedback/sound/play', payload=json.dumps({'siteId': device}), hostname='127.0.0.1', port=1883)
you should be able to already do that, using the hermes/audioServer/playBytes
topic to send the wav to play and deactivating the feedback in the dialogue
that's true, but sending a file that says "yes" will be captured by the ASR, starting a monolog, because the ASR is already turned on, which is not the case for the feedback sound
@fredszaq you told me you were on it? :) :) :)
After discussion, It seems that this feature is not likely to get implemented.
@Psychokiller1888 Do you have a use case description?
https://laurentchervet.wordpress.com/2019/03/06/satellites-and-the-multidetection-hell/
This is only one exemple. We've discussed that a lot with Fred when I was in Paris
@cpoisson many have asked for this :) My blog post revived it
https://puu.sh/CZM1s.png