Skip to content
HardwareLab

Pi5 Whisper Voice Assistant

A whisper.cpp voice assistant for the Raspberry Pi 5 (and Pi 4) that switches GPIO pins by voice: say 'green light on' and the green LED lights up.

Hardware:
Raspberry Pi 5
Difficulty:
Intermediate
Creator:
solarsamuel

whisper.cpp voice assistant for the Pi 5.

Pi5 Whisper Voice Assistant
No photo in the source; GitHub repository card, served from HardwareLab.

By solarsamuel

Posted

What it does

A whisper.cpp voice assistant for the Raspberry Pi 5 (and Pi 4) that switches GPIO pins by voice: say 'green light on' and the green LED lights up.

What you need

Difficulty
Intermediate
License
No license stated

Parts

  • Raspberry Pi 5 [not stated]
AI model or service
whisper.cpp

Prices, notes and sources: Parts and requirements

Parts and requirements

PartSpec / notesNeededPrice
Raspberry Pi 5 Not stated

Full build guide

Steps

Difficulty
Intermediate
  1. git clone https://github.com/ggerganov/whisper.cpp
  2. Install libraries: sudo apt-get install libgpiod2 libgpiod-dev, sudo apt install gpiod, sudo apt install libsdl2-dev.
  3. In the whisper.cpp directory open up the Makefile and add -lgpiod to the end of the line starting with CC_SDL.
  4. Download tiny.en with ./models/download-ggml-model.sh tiny.en.
  5. Compile the stream program with make -j stream.
  6. Run ./stream -m models/ggml-tiny.en.bin --step 4000 --length 8000 -c 0 -t 4 -ac 512.

Full instructions: View original

How it works

The whisper.cpp `stream` example is compiled with libgpiod and listens continuously. Recognised phrases set GPIO 24 or 25 high, and you can add your own phrases or drive a relay HAT for motors and buzzers. The Pi 4 should use the tiny.en model; the Pi 5 handles up to small.en.

Limits and caveats

  • Pi 5 can go up to the small.en.bin model.
  • Add `-lgpiod` to the end of the `CC_SDL` line; otherwise you'll get a linking error.

Like this build? Get the weekly builds

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

Built something? Submit a build

Hardware

  • Raspberry Pi 5

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/pi5-whisper-voice-assistant/?utm_source=badge&utm_medium=referral&utm_campaign=launch_2w)

HTML

<a href="https://hardwarelab.dev/projects/pi5-whisper-voice-assistant/?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>