Arduino nano 33 BLE microphone sample length


i recently finished a quite accurate model for recognizing spells :slight_smile:
Deploying it to the arduino 33 ble was really easy and the microphone example worked like a charm!

But how is the recording time of the microphone defined? I would like to record for maybe 2 seconds.
Is this stored in the model_metadata.h in EI_CLASSIFIER_RAW_SAMPLE_COUNT? I tried to double the value but it crashed my arduino.

Greetings Jan

Hi @JanFiedler,

Glad to hear you have a model running well :slight_smile:

The sample length is retrieved from EI_CLASSIFIER_RAW_SAMPLE_COUNT but you cannot directly change it. The value is automatically generated while deploying the impulse in the studio and is equals to the Window size in the Impulse design section. If you wish to run your impulse on 2 seconds samples instead you will need to retrain your model as number of MFCC features will increase (that’s why changing the value in the Arduino directly doesn’t work as MFCC block is not dimensioned for it).



Hi aurel,

that explains everything. Thank you so much!

Greetings Jan

1 Like