Blog Home

Detect a crying baby with tinyML and synthetic data

Arduino TeamApril 24th, 2023

When a baby cries, it is almost always due to something that is wrong, which could include, among other things, hunger, thirst, stomach pain, or too much noise. In his project, Nurgaliyev Shakhizat demonstrated how he was able to leverage ChatGPT, text-to-audio, and tinyML technologies to build a cry detection system without the need for collecting real-world data himself.

The process is as follows: ChatGPT generates a series of text prompts that all involve a crying baby in some manner. These prompts are then passed to AudioLDM which creates sounds according to the prompts. Finally, Shakhizat used the Arduino Cloud’s Machine Learning Tools integration, powered by Edge Impulse, to train an ML model for deployment onto a Nicla Voice board. To create the sounds themselves, Shakhizat configured a virtual Python environment with the audioldm package installed. His script takes the list of prompts, executes them within an AudioLDM CLI command, and saves the generated sound data as a WAV file.

Once this process was done, he configured a project in the Edge Impulse Studio which trains a classifier model. The result after training completed was a model that could accurately distinguish between background noise and a crying baby 90% of the time, and deploying it onto the Nicla Voice showed the effectiveness of how synthetic datasets and embedded models can be used in the real world.

To read more, you can check out Shakhizat’s write-up here on Hackster.io.

Categories:NiclaNicla Voice

Leave a Reply

You must be logged in with your Arduino account to post a comment.