Build a home voice assistant on a Raspberry Pi
A developer rebuilt a home voice assistant on a Raspberry Pi 5. It can use cloud AI services or run fully on your own device. Simple commands like playing music skip the AI and run directly, so they respond quickly.
Fabio Manganiello rewrote the voice assistant running at home using Platypush, a free automation tool, and described the new setup on 19 November.
The assistant listens for a wake word, such as "alexa", using a small built-in detector. It then uses voice activity detection to know when you've stopped talking.
Speech-to-text and replies can come from cloud services, or from tools that run fully on your own device. The reply can also come from a local AI server that speaks the same language as OpenAI's service, such as Ollama.
Manganiello also added shortcuts. For a phrase like "play music", the assistant runs a local music command and never asks the AI, so it responds faster.
The setup runs on a Raspberry Pi 5. The microphone records at 44.1 kHz, so the audio is converted in software.
New to this? The key idea
A voice assistant is a chain of small steps. A wake word detector listens for one phrase, voice activity detection decides when you have stopped talking, speech-to-text writes down your words, and an AI model writes the reply. Each step can run in the cloud or on your own device, like choosing between a delivery service and cooking at home for each course.
Use it at work
Use it for: a home or office voice assistant that can keep audio local. Hobbyists and developers who want an alternative to commercial smart speakers should care.
Try it: follow the post's setup, which tested on a Raspberry Pi 5. Per the post: wake word via `assistant.microwakeword` (built-in models `okay_nabu`, `hey_jarvis`, `hey_mycroft`, `alexa`; the example uses `alexa`, default cutoff 0.9); voice detection via Silero VAD with `vad_backend: auto`; speech-to-text via `assistant.openai` (cloud) or `assistant.vosk` (fully local); text-to-speech via `tts.openai` or `tts.piper` (local). A `SpeechRecognizedEvent` hook matching phrases like `play (the)? music` runs `music.mpd.play` locally, and a `HotwordDetectedEvent` hook runs `assistant.openai.start_conversation`. Custom wake words can be added with a JSON manifest and a `.tflite` file. For the AI model, set `base_url` and `model` on the openai plugin to point at a compatible local server such as Ollama.
Before you roll it out: the cloud parts need an OpenAI API key and imply usage fees, prices not stated, and audio goes to that service. The local options avoid both. Licence of Platypush not stated. The Pi's microphone records at 44.1 kHz and is resampled in software, which can make detection sluggish. Defaults were tuned on synthetic audio and a few personal recordings, so you may need to adjust `detection_threshold` and `noise_floor_factor`. On the Pi 5, `tts.piper` added about 3 to 4 seconds of latency compared with `tts.openai`.
Summaries are written by AI from the linked source. Always check the original.