Request advice for training with voice

Hi,

The idea is to train my Nano 33 BLE sense so that it will recognize the name of a color.
I took 5000ms samples where 1x the color name is mentioned, in total 4 colors names + 1 background noise (Nano 33 BLE microphone does not give a high output ;-(
Total +/- 5min. data.

The Time series data Window size is set to 1000ms and Windows increase to 500ms

I’ve added Audio (MFCC) processing block and the Neural Network (Keras) learning block

In Feature explorer I see a dense cloud … doesn’t bode well.

Training Performance is bad at 47% with 1000 training cycles

  • What can I improve with parameters?
  • Did I choose the right Processing and Learning Block?
  • This case is possible or is ML not suitable for this?

Kind regards

Hi @marco, because you select a 1s. window most of your windows are noise, and thus this won’t separate well. To make keyword spotting work you’ll want the keyword within the 1s window.

  1. Click the three dots next to your sample.
  2. Select ‘Split sample’.

image

  1. This automatically finds the word and cuts it out:

In addition you’ll want to add some noise samples and ‘other’ words. You can find a dataset here: https://docs.edgeimpulse.com/docs/keyword-spotting

Tip: you can say the word multiple times in one recording, and the ‘Split sample’ will automatically crop out the samples.

We’ll be putting out a tutorial for dealing with discrete audio events at some point in the near future, but for now you can refer to https://www.youtube.com/watch?v=fNSKWdIxh8o for an example.

Hi Jan,

Thank you for the advice. I’ll try again.

Hi @Jan,

Excellent tutorial, I made a build for the Nano 33 BLE and deployed it to the device

If I want to control an LED when a keyword is recognized, what are the steps I need to take?

Do you have an example how I can control a LED?

Hi @marco, if you export as Arduino library and import in the Arduino IDE you can find the ‘nano_ble33_sense_microphone_continuous’ example.

Here you’ll have the predictions right after // print the predictions and you can do something like:

        for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) {
            if (strcmp(result.classification[ix].label, "red") == 0 && result.classification[ix].value > 0.7) {
                // turn LED on
            }
        }

Hi Jan,

Aha yes, It becomes more clear, I had already exported to Arduino and am going to view and edit the example sketch.

Great work! :+1:

1 Like

Yes I made it!

ML on Arduino Nano 33 BLE Sense

after setbacks with COM port and compile errors it finally worked!

1 Like

Awesome! Thanks for sharing!