Hi,
we are currently trying to implement an edge impulse model (keyword spotting, 600 ms window @ 16kHz) on a nRF52832.
The problem is that the SoC's RAM is already very full and barely fits our audio slab buffer, the library itself and the stuff that's already on it.
It seems like the wrapper requires an additional internal buffer to hold the samples. This unfortunately doesn't fit and we would like to point directly to the audio buffer that already contains our raw samples.
I would be grateful if you could give us a hint on how to achieve that.
Thank you very much.
Edit 1: What I probably have to do is to drastically reduce the "audio slab" size and use the wrapper's buffer to accumulate the data using the "ei_wrapper_add_data()" function.
What creates a problem then, however, is that the wrapper uses a float array. I have space for my 600 ms window filled with int16 samples but not for a float32 array of the same length :/
Edit 2: It seems like the ei_wrapper_add_data() function only accepts data inputs of the window length or larger. If I am not mistaken, that means that I need space for at least 2x the window length (which I don't have). For me only the following scenarios would work:
1. Small memory slab for the input audio that gradually fills the wrapper's buffer. When full -> run classifier on buffer data
2. Using only the audio data slab of total size = window size. Wait until slab is full -> run classifier on slab data
I don't need any continuous streaming functionality right now. Therefore "Filling buffer -> running inference -> filling buffer -> ...." would work for me.