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:
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
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.