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

Media player task blocking and memory tweaks #72

Merged
merged 16 commits into from
Sep 3, 2024

Conversation

kahrendt
Copy link
Contributor

@kahrendt kahrendt commented Sep 3, 2024

Several modifications to improve memory usage and task blocking:

  • Moves Bluetooth and WiFi buffers to external memory to avoid running out of memory on boot.
  • Moves pipeline task stacks into internal memory for speed (plenty of room due to the previous bullet!)
  • Speaker and pipeline tasks block on ring buffer read and writes instead of using fixed delays. This avoids switching to these tasks unnecessarily when no new data is available.
  • Pipeline task priorities are now dropped to 1, same as the main loop. This avoids starving the main loop from executing, which caused logged warnings and reduced wake word reaction time.
  • Logs which pipeline task encounters an error.
  • Fixes a bug when the media and announcement streams mixed together would cause clipping that caused distortion.

@kahrendt kahrendt merged commit 8acbcb3 into dev Sep 3, 2024
3 checks passed
@kahrendt kahrendt deleted the kahrendt-20240903-media-player-task-tweaks branch September 3, 2024 14:01
Copy link

github-actions bot commented Sep 3, 2024

Firmware built successfully! 🎉

Download and extract the firmware to install with https://web.esphome.io

Make sure to choose esphome-voice-kit-esp32s3/esphome-voice-kit-esp32s3.factory.bin.

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

Successfully merging this pull request may close these issues.

1 participant