Cutting the Cord

This custom voice assistant uses tinyML to control smart home appliances without relying on the cloud, bypassing common privacy concerns.

Nick Bild
5 months agoMachine Learning & AI
This smart home voice assistant does not require an internet connection (📷: Jallson Suryo)

Voice assistants have forever changed the way we interact with our smart homes, offering a seamless and hands-free control experience. These intelligent virtual companions, such as Amazon's Alexa, Google Assistant, or Apple's Siri, are capable of executing a variety of commands, making daily tasks more convenient. Users can easily control smart home functions, like turning on the lights, adjusting the thermostat, or even locking the doors, simply by speaking a command.

However, the convenience of voice-controlled smart homes comes with some trade-offs. Most voice assistants rely on a connection to the cloud to convert spoken words to text and interpret their meaning. This dependence on cloud processing means that an active internet connection is required for the devices to function. Moreover, sensitive information, such as voice recordings, may be transmitted and stored in the cloud, raising privacy concerns among users.

Another drawback is the increased latency associated with remote processing. Since voice commands need to be sent to the cloud for interpretation and then back to the smart home devices for execution, there is a noticeable delay in response time. This latency can lead to a less-than-ideal user experience, especially in situations where quick and precise control is desirable.

But if there are no commercial products on the market that meet your needs, what can you do? Build your own, of course! That is exactly what a machine learning enthusiast by the name of Jallson Suryo did, anyway. Suryo does not like the idea of sending recordings from inside his home to an unknown cloud server, so he built a custom voice assistant that can control his lighting and more. And the device does this without requiring a connection to the internet.

The project leverages a machine learning model to identify keywords in short audio clips. When certain keywords are recognized, like “on," “off," “one," or “two," that information can be used to, for example, turn on a lamp.

Suryo did not want the device to rely on a beefy workstation with an expensive, power-hungry GPU, so he built the keyword spotting algorithm with Edge Impulse Studio, which was designed to make it as easy as possible to deploy machine learning models to resource-constrained hardware. After designing and training the model with Edge Impulse, it was deployed to the tiny Arduino Nicla Voice microcontroller development board. The Syntiant NDP120 AI accelerator allows this board to run the algorithm locally, with no reliance on the cloud or appreciable latency.

The device continually listens for keywords, and when they are recognized, a signal is sent to an Arduino-compatible Pro Micro development board from SparkFun. This board, in turn, is connected to a series of 5 volt relays via its GPIO pins. These relays can then turn lamps, speakers, or any other appliances, on or off under control of the microcontroller.

While designing a custom voice assistant that can control a smart home may sound like a challenging problem at the outset, Suryo showed that it is actually pretty simple. With the easy-to-use Arduino development environment and a boost from Edge Impulse to help build the machine learning classifier, it was just a matter of writing a little bit of glue code and including a few common components. If you have got an itch to cut the cord on some of your own devices, make sure you take a look at Suryo’s project write-up first for some great tips.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles