I have followed the tutorials for recognizing sounds from audio!
I have train my own model to recognize a sound, tested it and now trying to run the model on the device directly. When I run the edge-impulse-run-impulse (latest step on tutorial) I was expecting to get predictions but instead I am getting this
How can I get the predictions running on the device? Any ideas if I did something wrong?
Hi @Fytos, the device is running out of memory (the way the serial is routed on the Arduino Nano 33 BLE Sense does not let you properly see this unfortunately, but you see the LED blink in an SOS pattern). I’d lower the FFT Length in the MFCC tab, e.g. to 256.
Hi @janjongboom you were absolutely right that made, thank you.
I am now trying to run my impulse continuously, I started following the tutorial for continuous audio sampling and when I run “edge-impulse-run-impulse --continuous”, I get this:
@Fytos is this your MyVoice project or a different one? I’ve exported to the Nano 33 BLE Sense on that board and that runs for me in continuous mode:
I am also trying to get a digital output on the arduino sense when the prediction is beyond a certain threshold at continuous mode.
I was trying to use the arduino library/example and change it to continuous mode but I am not sure how (I saw that there is a run_classifier_continuous in your sdk but it doesn’t work in the arduino ide), is it supported? Is there any other way?
The continuous sampling is harder to do in a generic way, as it requires a thread and signaling. Easiest is to use https://github.com/edgeimpulse/firmware-arduino-nano-33-ble-sense as a basis, replace the src/model-parameters and src/tflite-model folders here with the folders you get from the C++ export.
Hi @janjongboom, unfortunately, I wasn’t able to do the procedure successfully. I downloaded this https://github.com/edgeimpulse/firmware-arduino-nano-33-ble-sense, replaced the two folders with those from C++ export. I then tried to run “firmware-arduino-nano-33-ble-sense” through Arduino IDE but I get this error:
Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: “Arduino Nano 33 BLE”
firmware-arduino-nano-33-ble-sense:25:10: fatal error: src/setup.h: No such file or directory
#include “src/setup.h”
^~~~~~~~~~~~~
compilation terminated.
exit status 1
src/setup.h: No such file or directory
Finally, I didn’t understand what you mean by this:
How do I use this (which is C++ code) into my arduino firmware file, which I use as a basis?
Do I get something wrong? Sorry, I haven’t worked with arduinos before, but I’d really like to make this project work.
I then tried to run “firmware-arduino-nano-33-ble-sense” through Arduino IDE but I get this error:
You can’t build this through the Arduino IDE unfortunately, you’ll need to build with Arduino CLI (see the README for instructions).
How do I use this (which is C++ code) into my arduino firmware file, which I use as a basis?
You can take your Arduino firmware file, and incorporate it in that C++ file. Unfortunately we lose a bit of integration with the Arduino ecosystem and IDE when going this route. If you have some example code we can help you integrate it.
Hi again,
I would like to use this board as a command-word recognition device. I want to have the output as input to other devices or just to be able to use it somehow e.g. send it over wifi (not sure how yet). Also I would like to use the data from the other sensors of the board.
That’s the reason why I would like to be able to play with the source file. Is it any easier to do this using the other board (ST B-L475E-IOT01A) instead of Arduino nano 33?
Compare the label with the label that you’re looking for and value should be above a certain threshold.
If that works you can integrate any other Arduino libraries to respond to the keyword. The example project can contain Arduino libraries like any other Arduino application.
I upgraded to mbed 1.1.6 and returned back to 1.1.4 and that for some reason cleared that error from yesterday. I can compile and run my impulse in continuous mode. Now I will try to add my own code in ei_run_impulse.cpp