Skip to content
HardwareLab

Local Voice

A lightweight, low-latency voice assistant that runs fully offline on a Raspberry Pi 5 or Linux machine, with no cloud and no API keys.

Hardware:
Raspberry Pi
Difficulty:
Intermediate
Creator:
m15-ai

Real-time offline voice assistant for Pi and Linux.

Local Voice
No photo in the source; GitHub repository card, served from HardwareLab.

By m15-ai

Posted

What it does

A lightweight, low-latency voice assistant that runs fully offline on a Raspberry Pi 5 or Linux machine, with no cloud and no API keys.

  • Microphone Input using PyAudio
  • Real-Time Transcription with Vosk
  • LLM-Powered Responses using Ollama with models like gemma2:2b, qwen2.5:0.5b
  • Natural Voice Output via Piper TTS

What you need

Runs offline
Yes, per the source
Difficulty
Intermediate
License
No license stated

Parts

  • Raspberry Pi 5
  • USB microphone [not stated]
AI model or service
Ollama, Vosk, Piper

Prices, notes and sources: Parts and requirements

Parts and requirements

PartSpec / notesNeededPrice
Raspberry Pi 5 A Linux desktop also works.Required
USB microphone Not stated
  • OS: Raspberry Pi 5 or Linux desktop
  • Python 3.9+
  • PyAudio, NumPy, requests, soxr, pydub, vosk
  • SoX + ALSA utilities
  • Ollama with one or more small LLMs
  • Piper TTS with ONNX voice models

Full build guide

Steps

Difficulty
Intermediate
  1. Install dependencies: pip install pyaudio requests soxr numpy pydub vosk
  2. sudo apt install sox alsa-utils
  3. Place a config file at va_config.json

Full instructions: View original

How it works

PyAudio captures the microphone, Vosk transcribes in real time, and a small local LLM through Ollama (for example gemma2:2b or qwen2.5:0.5b) replies. Piper TTS speaks the answer, with optional SoX effects. A JSON config sets the model, voice and how many past exchanges the model remembers.

LayerComponentRuns on
STTVosk Raspberry Pi or Linux machine
TTSPiper TTS Raspberry Pi or Linux machine

Limits and caveats

  • Ollama is not a Python package โ€” it is a background service.
  • Make sure both .onnx and .json are present in the voices/ folder with matching names.

Like this build? Get the weekly builds

Every Thursday: the 5 best gadget hacks you can copy. Free.

Built something? Submit a build

Use-case ideas

  • Offline smart assistants
  • Wearable or embedded AI demos
  • Voice-controlled kiosks

Hardware

  • Raspberry Pi

More Raspberry Pi builds

This page is a short summary written by HardwareLab. Build steps, code and photos belong to the creator; follow โ€œView originalโ€ for the full project.

Featured? Add this badge

Built this? Paste the badge into your README. It links back to this page.

Featured on HardwareLab

Markdown

[![Featured on HardwareLab](https://hardwarelab.dev/badge.svg)](https://hardwarelab.dev/projects/local-voice/?utm_source=badge&utm_medium=referral&utm_campaign=launch_2w)

HTML

<a href="https://hardwarelab.dev/projects/local-voice/?utm_source=badge&utm_medium=referral&utm_campaign=launch_2w"><img src="https://hardwarelab.dev/badge.svg" alt="Featured on HardwareLab" width="188" height="20"></a>