OpenCode Plugin
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.
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 /ptt typed · abort + record · whisper transcribed
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
What you get
Free
Walkie-talkie mode
Type /ptt to abort model generation, speak your correction, type /ptt again to transcribe and redirect. Built on local whisper.cpp — offline, private, no API key needed.
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
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
Walkie-talkie — free
Streaming TTS starts playing
Plugin hooks text parts as they arrive from the model, buffers into sentences, generates audio via edge-tts, and plays immediately — no waiting for the full response.
Type /ptt to interrupt
Type /ptt — generation aborts, TTS stops, mic starts recording via sox. The recording stays active until you type /ptt again.
Speak your correction
Audio is captured to a WAV file at 16kHz mono. Speak your correction — the recording continues until you type /ptt again.
Release → transcribe → send
/ptt again → audio is transcribed by local whisper.cpp (or OpenAI API fallback). The transcript is sent as your next message via session.prompt().
Model pivots with full context
The model sees your spoken correction as a new user message. It responds directly to what you said — no restarting, no repeating context.
Voice architecture
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.
/ptt to interrupt — recording starts, generation aborts, type /ptt again to transcribe and redirect.
Made for the way you work
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 model. 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 model 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
Free
$0
Walkie-talkie with defaults — no license needed
/ptt)Pro
$29
One-time · No subscription · 3 machines
Checkout via Polar.sh · Key emailed instantly
Installation
Install sox
The voice monitor uses sox for microphone RMS sampling. Install it:
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:
speech-opencode handles mic input. The interrupt plugin provides streaming TTS and the /ptt walkie-talkie slash command.
Install whisper.cpp for speech-to-text
The walkie-talkie needs local transcription. Save and run this script (clones, builds, downloads ~140MB base model):
Or set OPENAI_API_KEY in your environment as a fallback.
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.
Install sox
Same as free tier — required for mic monitoring.
Buy a license
Purchase at Polar.sh → You'll receive a license key by email.
Add plugins with licenseKey
No npm install needed. Same npm package, just add the licenseKey option:
Install whisper.cpp for speech-to-text
The walkie-talkie needs local transcription. Save and run this script (clones, builds, downloads ~140MB base model):
Or set OPENAI_API_KEY as a fallback.
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
FAQ
"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 model generation and start recording, speak your correction, type /ptt again to transcribe and send. The model responds to your spoken correction.
Let Claude, ChatGPT, or Perplexity explain why interrupt might save you tokens and make your OpenCode sessions feel natural.