GuidesHow to Install Voice Interruption on OpenCode

How to Install Voice Interruption on OpenCode

Voice interruption is the standout feature: when the AI is speaking via TTS, you can just talk. The plugin detects your voice, stops the TTS, aborts the generation, and marks the session for correction injection.

1
Install sox
sox provides the microphone monitoring pipeline. Install it: sudo apt install sox (Linux) or brew install sox (macOS).
2
Add the plugin
Add "opencode-interrupt-plugin" to opencode.json. Voice interruption is part of the server plugin — no separate entry needed.
3
Adjust sensitivity
In Pro mode, set micThreshold (0.005–0.1, default 0.008) to control how loud you need to speak to trigger interruption.
4
Test it
Ask the AI a question, wait for TTS to start, then speak naturally. The TTS should stop and the model should prepare for your correction.
Tips
• The mic monitors at 10 samples per second — effectively zero latency impact.
• Voice interruption works alongside walkie-talkie mode. Use /ptt for deliberate corrections, or just speak for quick interruptions.
• In free mode, sensitivity defaults to a balanced threshold suitable for most environments.

Troubleshooting

If voice interruption is not triggering, ensure sox is installed and your mic is not muted. Run sox -d -t wav - to test mic input. Check logs for "Voice overlap detected" messages with debug mode on.

Ready to try it?

Get started free →