Journal

Local AI Voice Assistant: Whisper.cpp + Ollama (LLaMA 3.2) + Piper TTS on Raspberry Pi 5

Local AI Voice Assistant: Whisper.cpp + Ollama (LLaMA 3.2) + Piper TTS บน Raspberry Pi 5

May 12, 2026 · 2 min read
Local AI Voice Assistant: Whisper.cpp + Ollama (LLaMA 3.2) + Piper TTS on Raspberry Pi 5

Local vs Cloud Voice Assistant: Thai Context

Google Assistant and Amazon Alexa support Thai, but with limitations: every utterance is sent to Google’s or Amazon’s cloud for processing — raising PDPA and privacy concerns — and requires constant internet with 0.5–2 second latency depending on network conditions. A local AI voice assistant solves all these problems by running everything on-device.

Local AI Voice Assistant Stack

  1. Wake word detection: openWakeWord or Porcupine running on CPU, detecting keywords such as สวัสดีบ้าน, using <5% CPU load.

  2. STT (Speech-to-Text): OpenAI’s Whisper.cpp running a quantised model on Pi 5 CPU — no GPU required.

  3. Intent and response: Ollama running LLaMA 3.2 3B quantised (Q4) as a local LLM to process commands and generate responses, connecting to Home Assistant via API.

  4. TTS (Text-to-Speech): Piper TTS (the fastest open-source local TTS), converting text to speech with a Thai voice model.

Raspberry Pi 5 Specs and Performance

Raspberry Pi 5 (8GB RAM): Whisper.cpp Tiny Thai (Q4): ~1–2 seconds per 10-word sentence; Whisper.cpp Small Thai (Q4): ~3–5 seconds (more accurate); Ollama LLaMA 3.2 3B (Q4): ~3–8 seconds per 50-token response; Piper TTS: <0.5 seconds per 20-word sentence. Total latency: 4–15 seconds — acceptable for Smart Home commands but 3–5× slower than cloud.

Recommendation: use Tiny/Small model for Smart Home commands with limited vocabulary to minimise latency; reserve larger models for complex queries.

Comparison with Google Assistant and Alexa

Google Assistant (Thai): 0.5–1 second latency, best Thai NLU — but sends audio to Google Cloud, requires constant internet, and exists within an advertising ecosystem.

Amazon Alexa (limited Thai): limited Thai support with some Skills not available in Thai; latency similar to Google; smaller ecosystem for Thailand.

Local Whisper + Ollama: complete privacy, works without internet, no subscription fees — but higher latency and hardware investment required (Pi 5 costs ~2,500–3,500 THB).

Ollama for Home Automation Intent

Ollama serves the LLM locally via REST API at localhost:11434. Write a system prompt defining the role: a HappySmart smart home assistant that receives Thai commands and sends Home Assistant actions as JSON. Home Assistant connects to Ollama via a custom component or Python REST script to execute the resulting action.

Voice Pipeline in Home Assistant

HA 2023.10+ includes the built-in Wyoming protocol, supporting local STT/TTS/wake word. Install Whisper.cpp and Piper as HA OS add-ons or Docker containers; connect them to the Assist pipeline in HA Settings. The result is a microphone-based voice interface that speaks and understands natively through Home Assistant.

Cost and ROI

Cloud (Google/Alexa): free but with privacy trade-offs and internet dependency. Local (Pi 5 8GB + USB microphone + speaker): 3,000–4,000 THB one-time, no monthly fees. Immediate return if privacy is valued highly.

Questions & answers

Can Ollama really run LLaMA 3.2 on Raspberry Pi 5?
Yes — LLaMA 3.2 3B quantised (Q4) uses ~2–3GB RAM and runs comfortably on Pi 5 8GB. It generates a 50-token response in 3–8 seconds — sufficient for Smart Home commands but not suitable for complex reasoning that requires a larger model.
How does Whisper.cpp differ from the OpenAI Whisper API?
Whisper.cpp is a C++ port of OpenAI Whisper, optimised for CPU, running entirely locally — no audio sent to cloud, no API cost. The OpenAI Whisper API processes in the cloud, is faster, but charges per minute and offers less privacy.
Does Piper TTS support Thai?
Yes — Piper TTS provides free Thai voice models to download. Audio quality is better than eSpeak but not as natural as Google TTS or Azure Neural TTS. For Smart Home command confirmation, it is more than adequate.
Why use a local LLM instead of GPT-4o or Claude API?
GPT-4o/Claude API quality is far superior, but every home command would be sent to OpenAI/Anthropic servers — a significant privacy concern for household data. They also require constant internet and monthly API fees. A local LLM is well-suited to the limited vocabulary of Smart Home commands.

Related reading