OpenCode Plugin

Don't wait for the LLM to finish. It hears you.

Every AI tool makes you wait your turn. Wait for the LLM to stop talking. Then correct it. Then restate everything it missed. Interrupt changes that. Speak when you want — the LLM catches what it was saying, pivots with full context, and keeps going. No waiting. No repeating. No turn boundaries.

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

Without interrupt — model never hears you

you actually make it recursive

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

↪ The model finishes explaining iterative. It never heard "recursive." Now you have to restate everything.

With interrupt — clean mid-sentence pivot

you actually make it recursive

interrupt captured · context injected with partial response

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

↪ The model pivoted mid-sentence. It knows exactly what it was saying and where to redirect.

Live demo

See it in action.

opencode — voice interruption
interrupt✓ mic monitor active · threshold 0.02 RMS (default)
🎙 voicehow 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...
micRMS 0.034 · TTS playing · overlap detected
interruptTTS stopped · partial content captured · source: voice
🎙 voiceactually make it recursive
interruptcontext injected · source: voice overlap
🔊 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...
// spoke over TTS · AI caught it · pivoted mid-sentence

What you get

Two tiers. One primitive.

🎙

Free

Voice overlap detection

Monitors microphone RMS via sox while OpenCode speaks. When you talk over the response, captures the partial answer and injects context. Works out of the box.

Free

Token savings

Interrupting mid-response means no wasted tokens on restating context. The model pivots directly from where it was cut off — fewer tokens per turn, lower latency.

🔒

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

Full configuration

Adjust mic threshold, monitor silence duration, TTS estimation rate, timing window, and trigger words. Debug mode for verbose logging.

📋

Pro

Debug logging

See every RMS reading, TTS start/end, and injection decision in real time. Essential for tuning thresholds to your mic and environment.

🔑

Pro

Polar.sh license key

Activates on first run, validates at each startup, 7-day offline grace period. Up to 3 machine activations per license. One-time $29.

~30%

Tokens saved per interrupt — no need to restate context

0

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

10×

Mic samples per second. Zero impact on OpenCode performance.

How it works

Under the hood.

Voice interrupt — free

1

TTS starts playing

Plugin hooks the speak tool call, records TTS content, estimates duration. State → TTS_PLAYING.

2

Mic monitor runs in background

A sox child process samples RMS energy 10× per second. Runs continuously — zero impact on OpenCode performance.

3

Voice detected during TTS

RMS crosses threshold while TTS_PLAYING → state moves to INTERRUPTED. Partial TTS captured at that moment.

4

Context injected via system prompt

experimental.chat.system.transform injects the partial content and source before the model sees your next message.

5

Natural mid-sentence pivot

Feels like interrupting a colleague. No turn boundaries. No stop button. Just speak.

Voice architecture

The
missing
middle layer.

interrupt sits between your voice plugins and the model. It does not replace speech-opencode or opencode-voice — it bridges them. sox is likely already on your machine. No additional dependencies needed.

No hooks into speech-opencode's internals are needed. The plugin runs a parallel audio monitor using the same sox tool. They coexist without conflict.
speech-opencodemic → text
interruptyou are here
OpenCode modelfull context
opencode-voicetext → speech
↑ monitors
sox mic monitorRMS 10×/sec

Made for the way you work

Pick your workflow.

🎙

Voice users

You speak to OpenCode all day. Interrupt makes conversations feel natural — speak over it mid-response and the model catches up with full context. No more waiting for it to finish.

🔊

TTS-heavy workflows

You rely on spoken output. When you need to redirect mid-explanation, interrupt captures exactly what was said and delivers context to the next turn. Like cutting in during a conversation.

⌨️

Developers

Pair programming with the AI? When the model goes down the wrong path mid-sentence, just speak up. It pivots with full context — no wasted back-and-forth retracing steps.

Pricing

Simple. One-time. Yours.

Free

$0

Voice interrupt with defaults — no license needed

  • Voice overlap detection
  • Mic monitoring via sox (RMS 0.02 default)
  • System prompt injection
  • Mic threshold configuration
  • Silence / timing customization
  • Debug logging
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. Just add the entry to opencode.json in your project root or ~/.config/opencode/opencode.json:

{ "plugin": [ "opencode-interrupt-plugin" ] }
3

Restart OpenCode

Kill the session and run opencode. OpenCode downloads the plugin from npm and loads it. Free mode activates automatically.

Required — also add these for voice detection

Voice overlap requires a speech-input plugin (mic → text) and a TTS plugin (text → speech).

{ "plugin": [ "speech-opencode", "opencode-voice", "opencode-interrupt-plugin" ] }

speech-opencode handles mic input. opencode-voice handles TTS output. interrupt sits between them and catches the moment you speak over the AI.

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 plugin with licenseKey

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

{ "plugin": [[ "opencode-interrupt-plugin", { "licenseKey": "INTERRUPT-XXXX-XXXX" } ]] }
4

Restart OpenCode

On first boot you'll see license validation and the mic monitor starting:

[interrupt] License activated for your@email.com [interrupt] Pro mode — full configuration enabled

Pro configuration options

{ "plugin": [[ "opencode-interrupt-plugin", { "licenseKey": "INTERRUPT-XXXX-XXXX", "micThreshold": 0.015, "silenceMs": 200, "debug": true } ]] }
// 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) // debug: true | false (default false)

FAQ

Common questions.

Yes — sox is required for the microphone monitor. Install it with brew/apt/pacman.
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.
Yes — the plugin hooks into the harness layer, not model-specific APIs. Works with Claude, GPT-4o, local models via Ollama, anything OpenCode supports. For TTS, it watches tool calls named speak, tts, text_to_speech, or say — covering opencode-voice, opencode-voice-plugin, and the ElevenLabs OpenCode plugin. The mic monitor runs independently of which TTS provider you use.
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.

Still not sure?

Let Claude, ChatGPT, or Perplexity explain why interrupt might save you tokens and make your OpenCode voice sessions feel natural.