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

Add more debugging logs to microWakeWord #6238

Merged
merged 5 commits into from
Feb 18, 2024

Conversation

kahrendt
Copy link
Contributor

What does this implement/fix?

  • Will fill the audio buffer and warn if it is too full; e.g., people run it on an ESP32 or have too many other slow components
  • Add a basic dump_config output that logs the wake word, probability cutoff, and sliding window size
  • Validate the probability_cutoff parameter as a percentage rather than a generic float (fixes an issue where people could define a cutoff not between 0%=0.0 and 100%=1.0
  • Add a getter function for the wake word string. May be useful in lambdas to display the wake word.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): not applicable

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3609

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml

micro_wake_word:
  on_wake_word_detected:
    - voice_assistant.start:
  model: okay_nabu
  probability_cutoff: 50%

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (27a3a08) 53.71% compared to head (02c45c6) 53.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6238   +/-   ##
=======================================
  Coverage   53.71%   53.71%           
=======================================
  Files          50       50           
  Lines        9404     9404           
  Branches     1653     1653           
=======================================
  Hits         5051     5051           
  Misses       4055     4055           
  Partials      298      298           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@probot-esphome
Copy link

Hey there @jesserockz, mind taking a look at this pull request as it has been labeled with an integration (micro_wake_word) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@jesserockz jesserockz merged commit db9d837 into esphome:dev Feb 18, 2024
55 checks passed
@jesserockz jesserockz added this to the 2024.2.0b2 milestone Feb 18, 2024
@jesserockz jesserockz mentioned this pull request Feb 19, 2024
@jesserockz jesserockz mentioned this pull request Feb 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants