Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only trigger wakeword event handler if timer is active/expired #104

Closed
krisgesling opened this issue Sep 28, 2021 · 1 comment · Fixed by #105
Closed

Only trigger wakeword event handler if timer is active/expired #104

krisgesling opened this issue Sep 28, 2021 · 1 comment · Fixed by #105
Assignees

Comments

@krisgesling
Copy link
Contributor

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.

@chrisveilleux
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants