Recipes

Parlor: fully on-device real-time voice and vision assistant with llama.cpp

From README links · today

Content & CreativeSoftware & DevOps

Local multimodal voice AI with turn-taking, timers, and translation.

What they did

They built Parlor, a research-preview, fully on-device real-time multimodal assistant modeled on GPT-Live, running on a MacBook M3 Pro. The browser captures mic audio (PCM) and camera JPEG frames and streams them over a WebSocket to a FastAPI server. There, Silero VAD in the browser plus Pipecat's smart-turn-v3 (~20ms) decide whether the user actually finished a thought, so mid-thought pauses are held rather than answered. Gemma 4 E4B runs through llama.cpp with QAT q4_0 quantization, hearing and seeing the input and streaming a reply; the camera frame and speech are pushed through llama.cpp's prompt cache while the user is still talking so long questions answer almost instantly. Kokoro TTS (MLX on Mac, ONNX on Linux) speaks sentence-by-sentence as tokens generate. A separate grammar-forced JSON 'action head' over the same prompt cache decides timers, mode switches, and research requests, hidden under TTS playback so control markup never leaks into speech. The server owns the timer clock and announces rings aloud with a countdown chip. Live translation mode turns it into a consecutive interpreter, and just-listen mode makes it a silent scribe. An optional background reasoner on any OpenAI-compatible endpoint (OpenRouter plus web search by default) handles research requests while conversation continues, and is off unless REASONER_API_KEY is set. Barge-in aborts generation server-side.

How it went

A working research preview with a demo video, benchmark scripts (archbench.py for action recall, timerprobe.py for timer behavior), and a clear architecture. The author reports the action head reaches recall 1.0 versus 0.955 for in-band tags. It is explicitly rough-edged and buggy, and the author notes a failed attempt to fine-tune Gemma 4 12B into a full-duplex model, concluding a cascade system is still better for now.

Worth knowing

Self-described early experiment with rough edges and bugs, developed with heavy Claude assistance. Requires a capable local machine (author used an M3 Pro) and model weights; TTS backend differs by platform (MLX vs ONNX). Background research needs an external API key and is not fully on-device when enabled. Echo handling is imperfect without headphones. No full-duplex model; turn-taking relies on VAD plus smart-turn.

Wiring

Browser client captures mic PCM and camera JPEG frames and opens a WebSocket to a FastAPI server. Browser-side Silero VAD applies a ~200ms silence cutoff, then the server calls smart-turn-v3 to judge turn completion. Accepted turns go to Gemma 4 E4B served by llama.cpp (QAT q4_0) with prompt caching of audio and image input; tokens stream back and Kokoro TTS synthesizes sentence-by-sentence, with audio chunks and transcript returned over the same WebSocket for playback. In parallel, a grammar-constrained JSON request against the same prompt cache acts as the action head for timers, modes, and research; the server owns timer state and emits ring events. If REASONER_API_KEY is set, research requests are dispatched to an OpenAI-compatible endpoint (OpenRouter with web search) and the answer is spoken on arrival. Barge-in sends an abort that cancels server-side generation.

Try it yourself

Clone https://github.com/fikrikarim/parlor and get it running locally on my machine. Read the README and setup instructions, install dependencies for my platform (note the MLX vs ONNX TTS difference), download the Gemma 4 E4B QAT q4_0 weights for llama.cpp, and start the FastAPI server. Then open the browser client, verify mic and camera permissions work, and test: (1) a normal spoken question, (2) a mid-thought pause to confirm smart-turn holds, (3) 'set a timer for one minute' and confirm the countdown chip and spoken ring, (4) live translation mode, and (5) just-listen mode. Leave REASONER_API_KEY unset so everything stays on-device, and report any errors with the exact commands and logs.

Source

Tools in this stack

Run this stack

Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.

npx runchr install runchr/stack-llama-cpp-and-parlor
No CLI?curl -s https://api.runchr.com/api/recipes/runchr/stack-llama-cpp-and-parlor/manifest

This stack has no prompt yet. You get the tools and the wiring, not the prompt.

The manifest is also at api.runchr.com/api/recipes/runchr/stack-llama-cpp-and-parlor/manifest.