Inference on the Arduino Nicla Voice

A project log for AI Audio Classifier Recycle Bin

Recycle Bin that sorts rubbish based on the sound of collision using Edge AI audio classification.

samuel-alexanderSamuel Alexander 10/09/2023 at 07:420 Comments

This log will discuss how to use the Arduino Nicla Voice as the inference microcontroller board. The Nicla Voice features an NDP120™, which is an ultra-low powered and special-purpose deep-learning processor. Since this project is battery powered and will require the device to be always-on, this board makes it a really good use case. The board also features the Nordic nRF52832 which we will program via the Arduino IDE to send the inference results to the Actuator controller board (Portenta C33) via I2C using the ESLOV cable.

The .stl and editable CAD project files for the case can be downloaded in the "Files" section in this project, the .ino code can also be found there.

Just like the Seeed Studio nRF52840 Sense, the Nicla Voice also has a snap-fit case that enable us to mount the device to the acrylic "pyramid sink". Between the board and the top case there is a thin sheet of foam to filter unwanted wind noise and also protect the Nicla Voice from dirt and moisture.

My Edge Impulse Project for the Nicla Voice:

The steps for creating the AI Audio classifier model for the Nicla Voice using Edge Impulse is a little bit different than when using the Nano 33 BLE Sense and Xiao nRF52840 Sense because the Nicla Voice must use a Syntiant compatible pre-processing blocks.

In the "Syntiant" parameters tab features extractor change to log-bin (NDP120/200).

For the model parameters, I found that 300 cycles with 0.000025 learning rate give the best accuracy and lowest Loss value.

In the deployment tab click "Find posterior parameters" this is special for the Nicla Voice, since we want to ignore unknown/noise we can uncheck "z_openset". The way it works is very similar to wake word detection for virtual assistant in our smartphones or smart-home speakers, the difference is instead of saying "siri", "ok Google", or "Alexa" the event will be initiated when the collision sound of bottle, can, paper, or pong is detected.

After the Posterior parameters have been configured, click build model. The model will start building and will be automatically downloaded when it is done. Once done, flash the firmware, upload the Arduino code, mount the device on the AI Audio Recycle Bin and then everything will be ready to go!