Arduino BLE (Error sample buffer overrun)

My model is tiny, and performance are this one :

But, when i check it using arduino, here is what i have :
Here is the error i got in terminal :
"
Error sample buffer overrun. Decrease the number of slices per model window (EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW)
ERR: Failed to record audio…
Predictions (DSP: 20 ms., Classification: 264 ms., Anomaly: 0 ms.):
mxxxx: 0.01562
noise: 0.98438
Error sample buffer overrun. Decrease the number of slices per model window (EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW)
ERR: Failed to record audio…
Error sample buffer overrun. Decrease the number of slices per model window (EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW)
"
I try to decrease the slices (value down to 1), but this affect nothing in the result.
Still same error…

Could you help please ?

Hi @Tronic19,

What is the window size in your model? Also if you don’t mind sharing your project ID I could have a quick look.

Aurelien

Hi Aurelien,

My window size is 500ms (with window increase of 100ms)

My project ref. is this one : 16126#

Bruno

Hi @Tronic19,

Your classification performances seem a bit off, I have around 180ms running your model.

Have you changed anything else in the default continuous sketch?
Also, which Arduino version and Arduino Nano BLE package are installed? I’m using latest IDE 1.8.13 and mbed OS boards v1.3.1.

Because your impulse takes roughly 280ms you can’t run continuously, 2 slices would take 560ms which is more than your window. What you can do in the meantime is switch to the regular microphone example sketch (not the continuous), and remove the delay(2000); in the loop(). This is equivalent to 1 slice.

I’ll also check with the team why we can’t set up 1 slice in the continuous example.

Aurelien

Hi aurelien,

Here is my replies :

  • No change in the default continous sketch
  • Here is version of my BLE : (I think it is the last release , dont know where to see it)
    BN: Arduino Nano 33 BLE
    VID: 2341
    PID: 805a
    and my arduino soft (mac) is the : 1.8.13

My ask, if i understand you well,
To run correctly, my impulse (inferencing time) must take then less than 100 ms to run correctly on the BLE ? or is it another problem with microphone buffer ?
(I need to run only in continuous mode)

Thanks for reply,

You can check the package version in Tools -> Board -> Boards Manager and look for mbed:

Regarding timing constraints in continuous mode, you can check our documentation here. Example: with a 500ms window and 2 slices per window, each slice is 250ms. To avoid buffering issue the inferencing has to be quicker than 250ms.
FYI, we are going to fix the issue with EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW=1.

Aurelien

1 Like

Hi aurelien,

You are right, i was in : 1.1.6
Just updated to : 1.3.1
(Dont know the differences, but now it is updated)

Will check all again now ++

Hey @aurel I have the same issue but didn’t get you guys, I have window size of 1000ms and window increase is 500 ms can you hep me out? why buffer overruns?

Hello @Shanzay,

On this doc page, I added this graph recently to help you understand the window size vs window increase:

graph

  • The window size is the size of the raw features that is used for the training

  • The window increase is used to artificially create more features (and feed the learning block with more information)

Best,

Louis

Thanks @louis I got your point but what i have to do to remove this error?
should i decrease window increase size?

Yes window increase should be less or equal to your window size.

Best,

Louis

Alright, Thanks @louis

If the Sample Size is equal to or less than the Window Size then the algorithm will not take into account Window Increase (aka no extra artificially generated features will be created), correct?

Hi @MMarcial,

That is correct. Also if you have a sample size smaller than the window, the padding should be enabled otherwise no window will be extracted from this sample.

Aurelien