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

Fix some Voice Assistant bugs #6121

Merged
merged 4 commits into from
Jan 19, 2024
Merged

Fix some Voice Assistant bugs #6121

merged 4 commits into from
Jan 19, 2024

Conversation

jesserockz
Copy link
Member

What does this implement/fix?

Some changes in #6102 had some unexpected side effects when the ring buffer got filled up entirely due to VAD before streaming to HA.

Fix that by allocating 1 more byte in the RingBuffer so the expected number of bytes can be written and read correctly as StreamBuffer will only have space for size - 1

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): fixes esphome/issues#5392

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

Test Environment

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

Example entry for config.yaml:

# Example config.yaml

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:

@jesserockz jesserockz requested a review from a team as a code owner January 19, 2024 13:13
@jesserockz jesserockz changed the title Allocate 1 more byte in RingBuffer Fix some Voice Assistant bugs Jan 19, 2024
@jesserockz jesserockz added this to the 2023.12.8 milestone Jan 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6a8da17) 53.69% compared to head (61a868e) 53.69%.
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6121   +/-   ##
=======================================
  Coverage   53.69%   53.69%           
=======================================
  Files          50       50           
  Lines        9398     9398           
  Branches     1652     1652           
=======================================
  Hits         5046     5046           
  Misses       4053     4053           
  Partials      299      299           

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

@jesserockz jesserockz merged commit 0cbc06a into dev Jan 19, 2024
55 checks passed
@jesserockz jesserockz deleted the jesserockz-2024-015 branch January 19, 2024 14:38
jesserockz added a commit that referenced this pull request Jan 19, 2024
@jesserockz jesserockz mentioned this pull request Jan 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 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.

2023.12.7 - ESP32 s3 Box 3 - no longer detects wakeword
2 participants