projects

Knight Rider

A talking K.I.T.T.: voice conversations with an LLM, running locally on a Raspberry Pi 5 inside a toy car.

A black K.I.T.T. toy car from Knight Rider on a dark table

Knight Rider is the demo from my workshop "Rust at The Edge: AI Development, Edge Deployment, Real World Inference" at RustConf 2025 in Seattle. You talk to the car, and it answers. Speech recognition, the language model and speech synthesis all run on a Raspberry Pi 5 hidden inside a Playmobil K.I.T.T., with no cloud involved.

The code is meant as a reference for building your own voice assistant in Rust.

How it works

Four AI models work together in a loop:

  1. Silero VAD listens to the microphone and detects when someone is speaking.
  2. Moonshine turns the speech into text.
  3. Gemma 3 270M, running in llama.cpp's server, writes the answer.
  4. Matcha TTS turns the answer back into speech.

While K.I.T.T. is working on an answer, it doesn't accept new speech input. Answers are capped at 200 characters, so generating the speech doesn't take too long.

Each model can be swapped: Whisper instead of Moonshine, Kitten or Kokoro instead of Matcha, and Gemma 3 1B for smarter but slower answers.

Hardware

The K.I.T.T. toy car with its roof removed, showing a small speaker and electronics inside
With the roof off: the speaker and electronics inside the car.

The Pi starts everything on boot, and K.I.T.T. says "All systems ready!" once it's listening.

Software

The app is written in Rust:

It runs on any computer, not just the Pi. Setup instructions are in the repository.