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

[voice_assistant] Bugfix: Fix crash on start #7662

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

kahrendt
Copy link
Contributor

@kahrendt kahrendt commented Oct 23, 2024

What does this implement/fix?

Adds nullptr initializations for the buffers, as it is causing issues when using the constructor instead of setup from PR #7630. Additionally, it adds some missing checks that test whether the speaker is defined or not (this will be necessary for a media player that outputs the audio through a speaker component)

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)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

not applicable

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

not applicable

Test Environment

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

Example entry for config.yaml:

# Example config.yaml

external_components:
  - source: github://pr#7662
    components: [voice_assistant]

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 Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.00%. Comparing base (4d8b5ed) to head (14fedef).
Report is 1514 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7662      +/-   ##
==========================================
+ Coverage   53.70%   54.00%   +0.29%     
==========================================
  Files          50       50              
  Lines        9408     9724     +316     
  Branches     1654     1348     -306     
==========================================
+ Hits         5053     5251     +198     
- Misses       4056     4147      +91     
- Partials      299      326      +27     

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

@kahrendt kahrendt marked this pull request as ready for review October 23, 2024 16:16
@kahrendt kahrendt requested a review from jesserockz as a code owner October 23, 2024 16:16
@probot-esphome
Copy link

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

@balloob balloob added this to the 2024.10.2 milestone Oct 23, 2024
@jesserockz jesserockz merged commit fdebf04 into esphome:dev Oct 23, 2024
25 checks passed
@jesserockz jesserockz mentioned this pull request Oct 23, 2024
@kahrendt kahrendt mentioned this pull request Oct 24, 2024
14 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2024
@kahrendt kahrendt deleted the voice-assistant-fixes branch January 1, 2025 11:17
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.

4 participants