Introduction
I've had my fair share of interactions with voice assistants, and I've found them lacking in terms of privacy and performance. This article guides you through building your own voice assistant for just $15, which is both faster and more private than the ones you're used to.
Hardware Components
The core of your voice assistant is an ESP32, a microcontroller that can handle both Wi-Fi and Bluetooth. For the microphone, I used the INMP441 I2S mic, and for the speaker, I salvaged a small 4Ω speaker from a Bluetooth speaker. The LED matrix is used for visual feedback, and it's powered by a 5V rail connected to a 20W USB-C adapter.
Software Setup
The ESP32 runs ESPHome firmware, which communicates with your Home Assistant instance over an encrypted local API. The assistant pipeline includes Wyoming for speech-to-text and text-to-speech, both running on your home server. The wake word is set to 'Hey Nabu' (or 'Okay Nabu'), triggering a visual response from the LED matrix.
Challenges and Solutions
One of the biggest challenges was getting the wake word to work reliably. I settled on 'Hey Nabu' after trying out several default wake words. The speech-to-text and text-to-speech processes are handled by Wyoming, which is optimized for your hardware. The LLM models like Llama3. 5 7B Instruct are used for processing queries and controlling your smart home.
Performance and Limitations
With everything set up, the assistant can respond faster than most commercial voice assistants. The response time from speech to spoken answer is around two seconds on a warm cache. However, there are still some quirks, such as the TTS stream causing the intermediate text to be spoken aloud before the final answer. Despite these minor issues, the system offers significant privacy benefits and faster performance than mainstream alternatives.
Conclusion
For $15 in hardware and running on an old laptop as a home server, you can build your own voice assistant that's faster and more private than the ones you're used to. It's a practical solution for those who value privacy and performance over convenience and cloud-based services.

Comments