Sample buffer overrun (small program)

My code+model is small (flash=180k/1024k, ram=52k/256k) and fast (DSP+NN=35ms), but I am still seeing the sample buffer overrun error. I enabled debug_nn and see repeating successful prediction followed by sample buffer overrun. Can you help me understand the issue?

Target:
Arduino Nano 33 BLE Sense

Project Parameters
Name: _blesense_audioML_small
Window: 1000ms
Window Increase: 250ms

Compiler Output
Sketch uses 180496 bytes (18%) of program storage space. Maximum is 983040 bytes.
Global variables use 52152 bytes (19%) of dynamic memory, leaving 209992 bytes for local variables. Maximum is 262144 bytes.
Device : nRF52840-QIAA
Version : Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]
Address : 0x0
Pages : 256
Page Size : 4096 bytes
Total Size : 1024KB
Planes : 1
Lock Regions : 0
Locked : none
Security : false

Serial Output:
Edge Impulse Inferencing Demo
Inferencing settings:
Interval: 0.06 ms.
Frame size: 16000
Sample length: 1000 ms.
No. of classes: 2
Features (17 ms.):
Running impulse…
Predictions (time: 15 ms.):
background: 0.996094
scratch: 0.000000
Error sample buffer overrun. Decrease the number of slices per model window (EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW)
ERR: Failed to record audio…
Features (18 ms.):
Running impulse…

Predictions (time: 15 ms.):
background: 0.996094
scratch: 0.000000
Predictions (DSP: 20 ms., Classification: 15 ms., Anomaly: 0 ms.):
background: 0.00000
scratch: 0.00000
Error sample buffer overrun. Decrease the number of slices per model window (EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW)
ERR: Failed to record audio…

Hello @nrlabadie,

I can see this error on your output:

Can you tell me which code are your running? The microphone_continuous example or the microphone one?

If you’re using the continuous one, can you try to reduce the value line 31:

#define EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW 3

Also, can you share your project ID so I can check that everything is properly configured?

Best,

Louis