This is a nearly complete refactoring of the nabu media player. It is simplified and uses less memory. Some highlights:
Task stacks are moved into PSRAM
Should be able to handle esp32_improv, a media stream, and an announcement stream without running out of internal memory
Audio pipeline tasks communicate via a FreeRTOS Event Group
No watcher task is needed as all elements can communicate with each other
Makes the code vastly simpler
More robust due to simplified code
Pipeline tasks never are destroyed - FreeRTOS discourages destroying tasks in general. This provides stability in edge cases like repeatedly spamming a new media stream.
Moves the spectrogram feature generation buffers into PSRAM for microWakeWord
Added a faster resampler for the special case of 48 kHz (it's a simple decimation by 3). The FIR filter does still have some aliasing, and it doesn't properly handle stereo steams (it works, but one channel sounds wrong). Audio quality still isn't great!
Take 2 as I messed up by forgetting to remove my task debug logging without the appropriate sdkconfig options enabled in the yaml. Currently this yaml points to an old branch so I can pass the build test to get something that works merged back in.
This is a nearly complete refactoring of the nabu media player. It is simplified and uses less memory. Some highlights:
Take 2 as I messed up by forgetting to remove my task debug logging without the appropriate sdkconfig options enabled in the yaml. Currently this yaml points to an old branch so I can pass the build test to get something that works merged back in.