Voice activated Micro:bit with Machine Learning

Hi @janjongboom, you did a great tutorial but no one has been able to make it work ! I could compile your code and had a working example, however if I replace your code my the one generated with Edge Impulse studio, it doesn’t recognize the keyword. 100% working with the classification test inside studio. Any idea @janjongboom? I have 1min14 seconds of microbit keyword audio.

Hi @Juph, Apologies for the delay, I am in the EU timezone.

You can view the serial output of the microbit example and see exactly what the model is classifying from the incoming audio data by opening up a serial terminal (like Putty) that your microbit is connected to on your computer to baudrate 115200

@janjongboom Also notes some model troubleshooting steps for improving model performance in the README of this repository, here: https://github.com/edgeimpulse/voice-activated-microbit#poor-performance-due-to-unbalanced-dataset

Hi @jenny,

Effectively, when I say microbit, it classes microbit with 49% of confidence. Where in the code that I can adjust acceptation level lower to see if it works before adding more keyword dataset ? Thanhs for yr support. My time zone is Paris.

Predictions (DSP: 107 ms., Classification: 4 ms.):
microbit: 0.49804
noise: 0.00781
unknown: 0.49414


Now i have 5 minutes of microbit dataset, but it still doesn’t work. I have a warning in the data acquisition section, see below. How to improve it ? Thanks, Julien

Dataset train / test split ratio


Training data is used to train your model, and testing data is used to test your model’s accuracy after training. We recommend an approximate 80/20 train/test split ratio for your data for every class (or label) in your dataset, although especially large datasets may require less testing data.


80% / 20%

Labels in your dataset

Some classes have a poor train/test split ratio: microbit, noise, unknown. To fix this, add or move samples to the training or testing data.


97% / 3% (5m 4s / 10s)


100% / 0% (15m 48s / 0s)


100% / 0% (15m 42s / 0s)

Perform train / test split

Use this option to rebalance your data, automatically splitting items between training and testing datasets. Warning: this action cannot be undone.

Perform train / test split


Do you have any idea why my audio data has Raw features always 0, 0, 0, 0, 0, … I m using the microphone from Samsung A50. I can hear the sound but raw features = 0, 0, 0, 0, 0, 0. I think it is the reason why the audio classification doesn’t work at the end on the micro:bit ? Thanks

Hi @Juph,

For better visibility, for future posts can you please create a new topic on our forum? https://forum.edgeimpulse.com/

Your audio sample’s first few raw features are 0,0,0,0… because the sample you have selected doesn’t have any audio until around the 350 time mark.

To copy the entire raw features array, click on the “copy” icon next to the “Raw features” heading.


hi, i am using the steps for a project. I keep getting this error the cmake is not found but I have installed it please help

Hi @janjongboom,

This is great. I’m learning a lot and having fun with this project. I am, however, getting an error when following the Docker build instructions (see Feb 13 reply). The error seems to occur on the “RUN python build.py” step - executor failed running [/bin/sh -c python build.py]: exit code: 1. I am using a MacMini with M1 processor. Details are below. I would appreciate any advice. Thanks!