OpenCode Plugin

AI conversations shouldn't have turns.

Humans interrupt, clarify, and change direction mid-sentence. AI should too. Interrupt lets you speak at any moment without losing context or waiting for the AI to finish.

Walkie-talkie works free with defaults. Pro config is $29 one-time, 3 machines, no subscription.

Without interrupt — you wait. It never hears you.

you actually make it recursive

ai ...prev, curr, and next. You initialise prev as None, curr as head, then...

↪ You wait 30 seconds for the AI to finish explaining the wrong thing. It never heard you. Now you start over.

With interrupt — mid-sentence pivot

you actually make it recursive

interrupt /ptt typed · abort + record · whisper transcribed

ai Recursive approach: base case when node is None. Recurse on the rest, update the next pointer...

↪ The AI pivoted mid-sentence. It heard you. No waiting. No repeating.

Live demo

See it in action.

opencode — walkie-talkie
interrupt✓ walkie-talkie active · type /ptt to talk
⌨️ texthow do I reverse a linked list in Python?
🔊 ttsThere are two main approaches. The iterative method uses three pointers — prev, curr, and next. You initialise prev as None, curr as head, then loop...
⌨️ cmd/ptt typed · session aborted · recording started
interruptgeneration aborted · TTS stopped · mic recording
🎙 pttactually make it recursive
whisper⚡ "actually make it recursive"
⌨️ cmd/ptt typed again · sending as prompt
🔊 ttsRecursive approach: base case when the node is None or the last node. Recurse on the rest, update the next pointer to point back, then return the new head...
// interrupted the AI mid-sentence → it pivoted without missing a beat

What you get

Two tiers. One primitive.

🎤

Free

Walkie-talkie mode

Type /ptt the moment the AI goes off track — generation stops, TTS cuts, mic opens. Speak your correction, type /ptt again, and the AI pivots mid-sentence. Transcripts are auto-cleaned — filler words, stutters, and false starts are stripped. When OPENAI_API_KEY is set, AI polishing extracts your final intent and fixes sentence structure like Wispr. Free: 20 interrupts/day.

🔊

Free

Streaming TTS

Speaks responses as they arrive via edge-tts neural voices. No waiting for the full response — audio plays the moment a sentence is detected. Built in, no separate plugin needed.

🔒

Free

Privacy-first

All audio processing is local — no audio or conversation data ever leaves your machine. The only outbound call is license validation.

♾️

Pro

Unlimited interrupts

No daily cap. Interrupt as often as you need — every correction, every redirect, every mid-sentence pivot. The only limit is your conversation.

🎯

Pro

Whisper model selection

Choose small, medium, or large for better accuracy on non-native accents and noisy environments. Free is locked to base. Set whisperModel in config.

🗣️

Pro

TTS voice + auto-language

Pick your edge-tts voice via ttsVoice config. Auto-language detection switches TTS voice on the fly — speak in French, get a French voice. Free uses the default voice only.

~30%

Tokens saved per interrupt — no need to restate context

0

Context restatements needed. The AI catches up mid-sentence.

10×

Mic samples per second. Zero impact on OpenCode performance.

How it works

Under the hood.

Walkie-talkie — free

1

Streaming TTS starts playing

Plugin hooks text parts as they arrive from the AI, buffers into sentences, generates audio via edge-tts, and plays immediately — no waiting for the full response.

2

Type /ptt to interrupt

Type /ptt — generation aborts, TTS stops, mic starts recording via sox. The recording stays active until you type /ptt again.

3

Speak your correction

Audio is captured to a WAV file at 16kHz mono. Speak your correction — the recording continues until you type /ptt again.

4

Release → transcribe → send

/ptt again → audio is transcribed by local whisper.cpp (or OpenAI API fallback). Transcript is auto-cleaned — filler words stripped, stutters removed, false starts corrected. With OPENAI_API_KEY, LLM polishing extracts your final intent and fixes sentence structure like Wispr. Clean text is sent via session.prompt().

5

Model pivots with full context

The AI sees your spoken correction as a new user message. It responds directly to what you said — no restarting, no repeating context.

Voice architecture

The
missing
middle layer.

interrupt includes a built-in streaming TTS engine powered by edge-tts. No separate TTS plugin needed — it speaks responses as they arrive. sox is likely already on your machine. No additional dependencies needed.

TTS is streamed sentence-by-sentence using edge-tts neural voices. Audio plays the moment a sentence boundary is detected — no waiting for the full response. Type /ptt to interrupt — recording starts, generation aborts, type /ptt again to transcribe and redirect.
speech-opencodemic → text
interruptyou are here
OpenCode modelfull context
interrupt TTSstreaming speech
↑ monitors
sox mic monitorRMS 10×/sec

Made for the way you work

Pick your workflow.

🎙

Voice users

You speak to OpenCode all day. Walkie-talkie makes conversations feel natural — type /ptt to cut in mid-response, speak your correction, type /ptt again to redirect the AI. No more waiting for it to finish.

🔊

TTS-heavy workflows

You rely on spoken output. When you need to redirect mid-explanation, type /ptt to abort playback, speak over it, and type /ptt again to send your spoken correction via whisper transcription.

⌨️

Developers

Pair programming with the AI? When the AI goes down the wrong path mid-sentence, type /ptt to stop it, speak the correction, type /ptt again to continue. No wasted back-and-forth retracing steps.

Pricing

Simple. One-time. Yours.

Free

$0

20 interrupts/day — no license needed

  • Walkie-talkie mode (/ptt)
  • Smart text cleaning (auto-strip fillers)
  • Local whisper STT (offline)
  • Streaming TTS (edge-tts)
  • 20 interrupts/day cap
  • Whisper model selection
  • TTS voice + auto-language
Install Free →

Installation

Up in two minutes.

1

Install sox

The voice monitor uses sox for microphone RMS sampling. Install it:

# macOS brew install sox # Ubuntu / Debian sudo apt install sox # Arch sudo pacman -S sox
2

Add the plugin to opencode.json

No npm install needed — OpenCode downloads plugins automatically. Add this entry to opencode.json in your project root or ~/.config/opencode/opencode.json:

{ "$schema": "https://opencode.ai/config.json", "plugin": [ "speech-opencode", "opencode-interrupt-plugin" ] }

speech-opencode handles mic input. The interrupt plugin provides streaming TTS and the /ptt walkie-talkie slash command.

3

Install whisper.cpp for speech-to-text

The walkie-talkie needs local transcription. Save and run this script (clones, builds, downloads ~140MB base model). Set MODEL=small for better accuracy with non-native accents:

#!/usr/bin/env bash # Save as install-whisper.sh && bash install-whisper.sh set -euo pipefail WHISPER_DIR="${WHISPER_DIR:-/tmp/whisper-cpp}" INSTALL_DIR="${INSTALL_DIR:-${HOME}/.local/bin}" MODEL="${MODEL:-base}" MODEL_FILE="ggml-${MODEL}.bin" echo "==> Installing whisper.cpp + ${MODEL} model" git clone --depth 1 https://github.com/ggerganov/whisper.cpp "${WHISPER_DIR}" cmake -S "${WHISPER_DIR}" -B "${WHISPER_DIR}/build" -DBUILD_SHARED_LIBS=OFF cmake --build "${WHISPER_DIR}/build" --config Release -j"$(nproc)" mkdir -p "${INSTALL_DIR}" cp "${WHISPER_DIR}/build/bin/whisper-cli" "${INSTALL_DIR}/whisper" 2>/dev/null \ || cp "${WHISPER_DIR}/build/bin/whisper" "${INSTALL_DIR}/whisper" curl -fSL "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/${MODEL_FILE}" \ -o "${INSTALL_DIR}/${MODEL_FILE}" echo "==> Done. Ensure ${INSTALL_DIR} is on your PATH."

Re-run with MODEL=small or MODEL=medium for better accuracy. Or set OPENAI_API_KEY in your environment — preferred for accent accuracy (used first when available).

4

Restart OpenCode & verify

Kill the session and run opencode. OpenCode downloads the plugins from npm and loads them. Free mode activates automatically. Verify with opencode plugin list.

1

Install sox

Same as free tier — required for mic monitoring.

# macOS brew install sox # Ubuntu / Debian sudo apt install sox # Arch sudo pacman -S sox
2

Buy a license

Purchase at Polar.sh → You'll receive a license key by email.

3

Add plugins with licenseKey

No npm install needed. Same npm package, just add the licenseKey option:

{ "$schema": "https://opencode.ai/config.json", "plugin": [ "speech-opencode", [["opencode-interrupt-plugin", {"licenseKey": "INTERRUPT-XXXX-XXXX"}]] ] }
4

Install whisper.cpp for speech-to-text

The walkie-talkie needs local transcription. Save and run this script (clones, builds, downloads ~140MB base model). Set MODEL=small for better accuracy with non-native accents:

#!/usr/bin/env bash # Save as install-whisper.sh && bash install-whisper.sh set -euo pipefail WHISPER_DIR="${WHISPER_DIR:-/tmp/whisper-cpp}" INSTALL_DIR="${INSTALL_DIR:-${HOME}/.local/bin}" MODEL="${MODEL:-base}" MODEL_FILE="ggml-${MODEL}.bin" echo "==> Installing whisper.cpp + ${MODEL} model" git clone --depth 1 https://github.com/ggerganov/whisper.cpp "${WHISPER_DIR}" cmake -S "${WHISPER_DIR}" -B "${WHISPER_DIR}/build" -DBUILD_SHARED_LIBS=OFF cmake --build "${WHISPER_DIR}/build" --config Release -j"$(nproc)" mkdir -p "${INSTALL_DIR}" cp "${WHISPER_DIR}/build/bin/whisper-cli" "${INSTALL_DIR}/whisper" 2>/dev/null \ || cp "${WHISPER_DIR}/build/bin/whisper" "${INSTALL_DIR}/whisper" curl -fSL "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/${MODEL_FILE}" \ -o "${INSTALL_DIR}/${MODEL_FILE}" echo "==> Done. Ensure ${INSTALL_DIR} is on your PATH."

Or set OPENAI_API_KEY — preferred for accent accuracy (used first when available).

5

Restart OpenCode & verify

On first boot you'll see license validation and the walkie-talkie /ptt command active. Verify with opencode plugin list.

Pro configuration options

{ "plugin": [[ "opencode-interrupt-plugin", { "licenseKey": "INTERRUPT-XXXX-XXXX", "micThreshold": 0.015, "silenceMs": 200, "debug": true } ]] }
// Free tier: walkie-talkie, TTS, whisper base, 20 interrupts/day // Pro unlimited: interrupts, +whisper model, +TTS voice, +auto-language // // Config options (pro only): // micThreshold: 0.005–0.1 (default 0.02) — RMS sensitivity // silenceMs: 100–2000 (default 300) — cooldown after voice // correctionTriggers: string[] — extra trigger words // timingWindowMs: 1000–15000 (default 5000) // whisperModel: "small" | "medium" | "large" | full path (default "base") // ttsVoice: any edge-tts voice (default "en-US-AvaNeutral") // debug: true | false (default false)

FAQ

Common questions.

Yes — sox is required for the microphone monitor. Install it with brew/apt/pacman.
Add "opencode-interrupt-plugin" to your opencode.json plugins array. Install whisper.cpp (copy-paste the install script from the install section) or set OPENAI_API_KEY. Restart OpenCode — type /ptt to abort AI generation and start recording, speak your correction, type /ptt again to transcribe and send. The AI responds to your spoken correction.
The pro tier has a 7-day offline grace period. After a successful license validation, your activation is cached locally. If you're offline at startup, the plugin uses the cached result and logs a warning. After 7 days without internet validation, it stops loading until you reconnect.
Yes. Each license covers 3 machine activations. If you need to move to a new machine, run the deactivate command on the old one first to free a slot. If you can't access the old machine, email support@camaramagic.com and we'll manually release the activation.
Free tier is capped at 20 interrupts/day. An "interrupt" is any walkie-talkie (/ptt) send or voice overlap detection. The cap is tracked locally at ~/.cache/opencode/interrupt-count.json with a tamper-evident checksum — honest users hit the cap and see a toast. It resets daily. Pro ($29 one-time) removes the cap entirely. This is a gentle nudge, not DRM — the file can be deleted to reset, but we trust you not to.
Yes — the plugin hooks into the harness layer, not model-specific APIs. Works with Claude, GPT-4o, local models via Ollama, anything OpenCode supports. TTS is built in using edge-tts neural voices, so no separate TTS plugin is needed.
No. The plugin runs entirely locally. The only outbound request is to the Polar.sh license validation endpoint on startup — it sends your license key and activation ID, nothing else. No conversation content, no audio, no code leaves your machine through this plugin.

You know that feeling?

Waiting for AI to finish talking so you can correct it. Interrupt makes that feeling obsolete. See what others think: