I’m trying to use Edge Impulse to grab data from the microphone and classify it in realtime on RaspberryPi3B+ (Raspbian GNU/Linux 11 (bullseye)). Successfully installed Edge Impulse for Linux, able to connect the board to Edge Impulse Studio and record voice samples (edge-impulse-linux --disable-camera). I also can run edge-impulse-linux-runner:
**rpi@nnrpi**:**~/NN/fairytale_v2-v3 $** edge-impulse-linux-runner
Edge Impulse Linux runner v1.4.7
[RUN] Already have model /home/rpi/.ei-linux-runner/models/268016/v4/model.eim not downloading...
[RUN] Starting the audio classifier for Dmitry Sukhov / FairyTale_v2 (v4)
[RUN] Parameters freq 16000Hz window length 1000ms. classes [ 'Noise', 'Repeat', 'TellStory', 'Unknown' ]
[RUN] **Using microphone hw:2,0**
classifyRes 3ms. {
Noise: '0.0000',
Repeat: '0.0000',
TellStory: '0.0000',
Unknown: '0.0000'
}
I’ve also install Linux Python SDK and when I try to use the same model on the same HW (python3 classify.py modelfile.eim) I get error when try to select right audio device:
3 --> USB PnP Sound Device: Audio (hw:2,0)
8 --> pulse
12 --> default
Type the id of the audio device you want to use:
3
That device is not compatible
3 --> **USB PnP Sound Device: Audio (hw:2,0)**
8 --> pulse
12 --> default
Type the id of the audio device you want to use:
As audio device I use CM108AH based sound card. It perfectly works with RPi itself (record and play sounds in various python scripts) and with edge-impulse-linux-runner but doesn’t work with python script.
If I use Logitech CH270 webcam both linux-runner and python example works fine. If both are connected, I can choose input device (the card – fails as described, webcam works fine).
I would prefer to use in the project CH108 sound card instead of Logitech webcam…
What might be wrong? How to fix it?