#WioTerminal – Training an 🗣️ audio recognition module. 🎙️Record audio samples for training

Hi !

I think this may take more than 1 post, however the goal is simple:

Use Wio Terminal microphone to recognize wake up words and open or close the Azure IoT Door 🚪.

So, let’s start.

Edge Impulse

I’ll use Edge Impuse, to to train the voice recognition module. I talk about Edge Impulse several times, and I’m sorry if in your searchs you find these 2 images.

ElBruno TinyML session with sharks
El Bruno training a machine learning model to work with audio in Edge Impulse.

Please choose the correct (2nd) one 😁.

One of the coolest features of Edge Impulse, is that we can define a full ML process to train our models. There are plenty of tutorials in the home page, however this is a classic definition on how to train, validate, deploy and use a machine learning model.

Bonus, we can do this in 5 minutes ! I strongly advice to take a look at the Edge Impulse Guides and follow any of the included tutorials.


Ok, I mentioned that I want to use the Wio Terminal microphone to record my audio samples. Now is time to use another amazing tool integrated with Edge Impulse:

CodeCraft (tinkergen)

CodeCraft is a visual environment that we can use to program several devices. And we have access to :

codecraft device and new projects screen

And, if we work with Wio Terminal, we can also create tinyML models using Edge Impulse. We have 4 options

  • Motion Recognition
  • Gesture Recognition
  • Wake-up words
  • Smell Recognition
codecraft new tinyml model creation

So, let’s start with the Wake-up words recognition.

Recording Audio Samples to train our model

Once we select the audio model, we need to define our labels and we can start recording the audio data samples. In the next step, I defined 3 labels

  • background
  • open door
  • close door

This step also allow us to create a simple program to deploy to the Wio Terminal:

  • When we press the [Button A] it will record a [3 seconds] audio for the [open door] label.
  • When we press the [Button B] it will record a [3 seconds] audio for the [close door] label.
  • When we press the [Button C] it will record a [3 seconds] audio for the [background] label.

Important: in order to download the CodeCraft program, we need to install a device assistant locally.

Once we have this installed, we can upload the program to our Wio Terminal device and start to record our audios. In the following sample, I recorded 3 audios for each label:

download sample audios

We can now, add more audios and later download them to be used on Edge Impulse. That’s material for my next post !!!

Happy coding!


El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: