Edge Impulse Voice Recognition on Arduino 33 BLE with external Adafruit PDM Module

Hi, i know that is possible to run Edge Impulse on Arduino 33 BLE. But how can I add external PDM Module Adafruit PDM to simple 33 BLE and how should I upgrade code to use it with voice projects?

I have wired PDM Module CLK with D13, and DATA with D9, so V3.3 and GND.

I had so good projects on 33 SENSE, buts since lack of it i really need help with making 33 BLE work.

Thank You in advance for every help…

Hi @Ailone,

Yes, you can use a different microphone for the keyword spotting task. If you look at the nano_ble33_sense_microphone_continuous example in Arduino, you can see how continuous keyword spotting is done. That example uses the Arduino PDM microphone library, which means you’ll need to do a few things:

The nano_ble33_sense_microphone_continuous example should help you with the last two bullets. Hope that helps!

Thank You very much! I’ll follow Your advices. Hope I will manage! :slight_smile:

1 Like

Hy, I am working on project Reponse to you voice with nrf52840-dk by edge impulse. I am not using X-NUCLEO-IKS02A1 but try to work with adafruit pdm microphone. But I don’t understand the changes in firmware-nordic-nrf52840dk-nrf5340dk for pdm adafruit microphone.
I am not getting where to make changes for Adafruit pdm microphone working with nrf52840-dk

Hi @aayushi.kanojiya,

I don’t have a continuous keyword spotting example for the nRF series, but I have one for an STM32 that might offer some insights: ei-keyword-spotting/main.cpp at master · ShawnHymel/ei-keyword-spotting · GitHub. You need to create a double buffer to create a sliding window that stores the last n milliseconds of audio (where n is the size of your slice, as determined by EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW).

You’ll need to create a callback that fills the internal buffer as requested (given be audio_buffer_inference_callback() in the example I posted). From there, you need to call run_classifier_continuous() every x milliseconds (which is determined by EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW).

Note that the tricky part is to set up the PDM driver with interrupts with DMA to automatically fill the double buffer at the specified recording frequency while inference is running on the CPU. You’ll likely need to dive into your datasheet and find some nRF examples for that.

Hope that helps!