Counting How Many Times "Mummy" Is Said with a Custom Wake Word Detector

This counter listens for the word "mummy" by running an embedded machine learning model on a Raspberry Pi.

Overview

Parenthood can be a challenge, especially as children change from merely being able to scream/cry as babies into people that can verbalize what they want. This also comes with a downside, as incessant calls for a parent become very tiring quite quickly. So as a fun project to explore the world of embedded machine learning, Lorraine Underwood from element14 Presents decided to create a small system that counts the number of times her kids say "mummy" at home.

The hardware

For the base of her project, Underwood chose to use a Raspberry Pi 4 due to its plethora of IO connectivity and powerful microprocessor, not to mention the gigabytes of available RAM compared to smaller boards. Initially, she tried attaching a tiny USB microphone dongle and eventually a USB to auxiliary microphone adapter, but both ended up producing horrible quality audio. Instead, she ended up adding a ReSpeaker Dual Microphone Raspberry Pi HAT from Seeed Studio that contains two microphones, several RGB LEDs, and a 3.5mm audio jack for outputting sound.

Creating a model with Edge Impulse

With the hardware now figured out, Underwood moved onto the next step of creating the machine learning model in order to recognize when the keyword is spoken. She went to the Edge Impulse Studio, created a new project, connected her Raspberry Pi 4 via the CLI, and began collecting many samples containing either "mummy", unknown words, or background noise. The result was a model that could accurately detect the keyword around 88% of the time, and it was exported as an .eim file for use within a Python script.

Responding to mentions of "mummy"

The program Underwood wrote essentially listens for the keyword continuously, and when the confidence of the model goes beyond a certain threshold, a few things happen. First, a random audio file plays that encourages her son to either get someone else or simply a funny response. Second, she took a 0.96" OLED display from a Grove beginner kit and wired it to the Raspberry Pi 4, which displays the number of times "mummy" has been said so far.

For more information about how this project was created, you can watch element14's video below.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles