Voice AI demos run on a laptop with fast Wi-Fi and a studio microphone. Real devices have small processors, limited memory, flaky networks, and users who expect an answer in about a second. Closing that gap is where the interesting engineering lives.
This post covers the general lessons from building voice features on embedded Linux hardware. Specifics of client projects are kept out on purpose.
Start with the latency budget
Conversation feels natural at roughly a second or less from the end of speech to the start of a response. Everything you add has to fit inside that:
- Detecting that the user stopped talking
- Speech recognition
- The language model's response
- Text-to-speech
- Network round trips between each stage
Write the budget down in milliseconds, assign a slice to each stage, and measure constantly. Most teams discover the model isn't the bottleneck. The glue is.
Edge, cloud, or both?
On-device buys you low latency, offline operation, and privacy. It costs you model quality, memory, power, and engineering effort.
Cloud buys you the best models and fast iteration. It costs you network dependence, variable latency, ongoing usage fees, and data-handling obligations.
Hybrid is where most products end up: lightweight work on the device (wake word detection, voice activity detection, audio cleanup) and heavy lifting in the cloud. Deciding where the line sits is the central architectural choice.
What belongs on the device almost every time
- Wake word and voice activity detection. Always-listening features must be cheap and local.
- Audio front end. Noise suppression, echo cancellation, and beamforming are signal-processing problems best solved close to the microphone.
- Buffering and streaming. Send audio in small chunks as it's captured instead of waiting for a full utterance.
- Fallback behavior. The device should do something sensible when the network is gone.
Stream everything
Don't wait for a full transcript to start the language model, or a full response to start speaking. Streaming recognition, streaming model output, and streaming speech synthesis overlap the stages and can cut perceived latency dramatically.
Plan for the messy real world
- Echo from the device's own speaker feeding back into the microphone
- Interruptions, with users talking over the assistant
- Background noise and multiple speakers
- Spotty connectivity and reconnection
- Thermal throttling and power limits on small processors
A common example: a device plays audio from its own speaker while listening for the user. Without good echo cancellation, the assistant hears itself and responds to its own voice. Fixing it takes tuning on the device, not a better language model. The AI got blamed, but the signal processing was the problem.
Make it observable
Embedded devices are hard to debug in the field. Log timing for each stage, capture error states, and build a way to collect diagnostics (with user consent). You can't improve latency you can't see.
The takeaway
Voice on embedded hardware is a systems problem more than an AI problem. The model matters, but the winning products are the ones that treat latency, power, and failure handling as first-class features. Get the budget right first, then make the voice smarter.