Home / use case

Couch Commander: an offline voice remote for YouTube that understands Pidgin

At a glance
Models & engines
mlx-whisper (small) for speech to text on Apple Silicon
Gemma 4 E2B via Ollama to turn the sentence into a command
Key gotcha
AppleScript keystrokes didn't reach the Apple TV app's player, so he switched to YouTube in Chrome; you need View, Developer, Allow JavaScript from Apple Events turned on.

What they built

Watching YouTube on a laptop across the room means there's no remote. Couch Commander listens for "Hey Jarvis", pops up a small pixel sloth in the corner of the screen, and turns whatever you say next into a player command.

It understands everyday phrasing, including Pidgin: "abeg go back small" rewinds 15 seconds, "I no hear wetin she talk" rewinds 10 seconds, "make am louder" raises the volume and "skip this one" goes to the next video.

Everything runs on the Mac with no internet, account or API key, which matters because the microphone is always on in the living room.

Setup

  • openWakeWord for the "hey jarvis" wake word
  • webrtcvad to detect the end of speech
  • mlx-whisper (small) for speech to text on Apple Silicon
  • Gemma 4 E2B via Ollama to turn the sentence into a command
  • AppleScript to control YouTube in Chrome, MIT-licensed code on GitHub

How it works

  1. The wake word means it only listens when called, and voice activity detection stops recording when you stop talking.
  2. Whisper transcribes the clip, and Gemma gets the sentence with temperature 0, Ollama's JSON mode and Pidgin examples in the prompt. It must return one command from a fixed list, such as {"command": "rewind", "value": 15}, or none.
  3. Any invalid answer falls back to none, because pausing a video for no reason is worse than doing nothing.
  4. AppleScript runs JavaScript directly on the YouTube video element in Chrome.

Results & numbers

  • On 30 test phrases, 22 of them unseen, gemma4:e2b got 20 of 22 unseen phrases and 28 of 30 overall right at about 190 ms, against 18 of 22 and 26 of 30 at about 330 ms for gemma3:4b.
  • Turning off thinking took Gemma 4 from 1,489 ms per command to about 190 ms with no drop in accuracy.
  • Gemma 4's two misses both returned none, while Gemma 3's misses were wrong actions, like pausing on "tell me a joke" or going forward instead of back.

Gotchas

  • AppleScript keystrokes didn't reach the Apple TV app's player, so he switched to YouTube in Chrome; you need View, Developer, Allow JavaScript from Apple Events turned on.
  • Whisper returned empty text until the raw 16-bit audio was converted to floats between -1 and 1.
  • Most of the delay was a fixed 4-second recording window, not the AI; voice activity detection fixed it (wake word 0.13 s, Whisper 0.3 s, Gemma 0.25 s).
  • The laptop mic struggles across a noisy room, and Pidgin is harder for small Whisper than plain English.
“Here, the audio never leaves my Mac. You can unplug the router, and it still works.”— Benny

Do it yourself

  1. Install Ollama and pull gemma4:e2b, and install openWakeWord, webrtcvad and mlx-whisper on an Apple Silicon Mac.
  2. Listen for a wake word, then record until voice activity detection hears silence.
  3. Convert the audio to float samples between -1 and 1 and transcribe it with Whisper.
  4. Send the text to the model with thinking off, temperature 0, JSON mode and a fixed list of commands with examples in your own way of speaking; treat any invalid reply as none.
  5. In Chrome, enable Allow JavaScript from Apple Events and use AppleScript to run play, pause, seek and volume JavaScript on the YouTube video element.
Source: Benny (DEV Community) · Published 2026-10-24 · Added 2026-10-26. This write-up summarizes the original source; see it for full details.

Similar setups

Séance: local Whisper and Gemma 4 turn a grandmother's Malayalam voice notes into a searchable family archive

Clivin John built Séance, which transcribes and translates his grandmother's voice notes on his laptop, has Gemma 4 write memory cards, and answers questions only with her exact, verified words.

Clivin John (DEV Community) · 2026-10-31

A read-only Gemma 4 agent on Ollama that explains what fills a Mac's disk

A sysadmin's one-file Python agent lets Gemma 4 on Ollama dig through his home folder and write a Markdown report on disk usage, while code and a four-line macOS sandbox-exec profile make sure it can only look.

DEV Community (MediBlackSand) · 2026-11-30

A mock-interview coach where a local 4B model must quote you to mark you down

Yuva Kunaal built Local AI Interviewer, an open-source app that runs mock interviews on your own computer with qwen3.5:4b through Ollama and only reports a mistake when the model can quote it from your answer.

DEV Community (Yuva Kunaal) · 2026-11-26

PatchPal TinyAgent: a coding agent on a 4B model and a 6GB laptop GPU

WiseProbe adapted its PatchPal coding agent to run Gemma 4 E4B or Qwen3.5 4B through Ollama on a 6GB RTX A1000, using handoff-note compaction and capped file reads to work inside a 16K or 32K window.

WiseProbe Blog · 2026-11-25