-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Refactor wake-word waiting and record phrase #2589
Conversation
cb39ab2
to
d3d48be
Compare
Voight Kampff Integration Test Succeeded (Results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing really major, just some additional refactoring.
53ec1b0
to
e8b0399
Compare
I think I've handled most of the comments here. I'm investigating if there's a small logic issue. Feel free to re-review but don't merge just yet |
Voight Kampff Integration Test Succeeded (Results) |
e8b0399
to
45bbc0a
Compare
Did find and correct a small logic thing when checking the sentence completion, it was missing a check for the 0.25 sec of quietness. |
Voight Kampff Integration Test Succeeded (Results) |
Voight Kampff Integration Test Failed (Results) |
Voight Kampff Integration Test Succeeded (Results) |
- Add RollingMean data structure - Add simple CyclicBuffer data structure - Move out post find actions into separate method
- Return the data from the wakeword as a tuple. - Extract post wakeword actions from wait for wakeword method
Move wakeword duration to the wakeword engine since all wakeword engines doesn't really use phonemes
The function is based on the parameters of the Mic and is much more a method of the mic than a static function
_record_phrase now uses a helper class to track the noise in a sentence to determine when the user has stopped speaking. The logic should be the same but the same but allow for easier testing and manipulation.
45bbc0a
to
926d3ff
Compare
Voight Kampff Integration Test Succeeded (Results) |
Description
The wake-word waiting and record phrase methods mixed a lot of logic with maths and were reported as high complexity methods, this separates the math out from the methods keeping the logic.
How to test
Check that unit tests all pass and that Mycroft can still wakeup and process audio.
Contributor license agreement signed?
CLA [ Yes ]