Using edge-impulse-data-forwarder and the Microphone_PDM library

I am trying to use the edge-impulse-data-forwarder to see if it can recognize my hardware/app. But I am getting the below errors which sounds like permission errors but I am not so sure.

 To which project do you want to connect this device? mems-mic-training
[SER] Detecting data frequency...
[SER] Failed to get information off device No valid sensor readings received from device. Note that the data forwarder can only auto-detect frequencies >2Hz. You can override the frequency via --frequency.

The actual program is a C++ example program that sends audio over tcp from my mic (GitHub - particle-iot/Microphone_PDM: Library for PDM microphones for RTL872x and nRF52). The example program has already been tested and works really well so I thought I’d see if I could get it to work with Edge Impulse, mostly just curiosity…all this being said, I probably need to learn A LOT more before doing things like this but mostly curious…

any ideas on how to get the frequency? just in case that is what it is? and if it isn’t that, are there some other things I can try?

Hi @jim3,

To use the data forwarder, you need to send out raw samples in comma-separated value format over the serial connection. See here for more information on how to do that. My recommendation for collecting PDM microphone data from the P2 is to follow this guide to load the pre-compiled firmware and collect the data using the serial daemon or web USB right from Studio (Chrome only).

1 Like

Thanks! Just got a chance to revisit the forum. I will check out those links (I am familiar with the P2 guide and will go back over it).

How about uploading .WAV files that have already been recorded with my PDM Microphone? Is this an option as well to train the Edge Impulse LLM?

This is all new to me but it’s nice to see I can use software to help out as well. Thanks

nevermind. I see that you can and its very easy as well. Thanks for the help!
edit: On a sort of unrelated note. If at least for testing, can I use the iPhone’s microphone as well to train the model? I got a lot of reading to do obviously but figured I’d ask.

Hi @jim3,

Glad to hear you got it working! To answer the iPhone question: normally, I recommend using the exact sensor you plan to use in the field (after deployment) to collect data. However, I’ve had good luck collecting audio files from other microphones (iPhone, computer, etc.) and using them to train a model that’s deployed to an embedded system.