Only trigger wakeword event handler if timer is active/expired
krisgesling opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
The Timer Skill has an event handler to react any time the wake word is detected.
self.add_event("recognizer_loop:wakeword", self.handle_wake_word_detected)
The purpose of this is to check if an alarm is currently expired and beeping - if so, it doesn't play the beep while the mic is active.
This makes sense for the times when you have a timer beeping. But isn't needed if a timer isn't active.
It's a very minor bit of code that runs, however it has been raised by numerous people as a red herring for other issues because it logs a message that it's doing something.
Describe the solution you'd like
Is it worth enabling and disabling this event handler when a Timer is expired and cleared?
Describe alternatives you've considered
Could switch the log message to DEBUG which would reduce the number of people that see it. But it's also code that doesn't need to be run 95% of the time.
It shouldn't be disabled only when timers are expired because an active timer could become expired between wake word activation and speech. It can be disabled when there are no active timers, though.