GuidesHow to Enable Voice Interruption in OpenCode

How to Enable Voice Interruption in OpenCode

Voice interruption lets you simply speak while the AI is responding. The plugin detects your voice, stops TTS, aborts generation, and prepares for your correction.

1
Ensure sox is installed
Voice interruption requires sox for continuous microphone monitoring. Install it: sudo apt install sox (Linux) or brew install sox (macOS).
2
Add the plugin
Include "opencode-interrupt-plugin" in opencode.json. Voice monitoring starts automatically when the plugin loads.
3
Speak during TTS playback
When the AI is responding and TTS is playing, just speak naturally. The plugin detects your voice within ~100ms and aborts the generation.
4
Check the result
After interruption, the model's next response will include context about what it was saying and what you said. It pivots seamlessly.
Tips
• Speak clearly and at a normal volume. The default threshold is calibrated for typical conversation levels.
• In noisy environments, use /ptt instead for deliberate walkie-talkie mode. Voice interruption may trigger on background noise.
• Pro users can adjust micThreshold to fine-tune sensitivity to their specific microphone and environment.

Troubleshooting

If voice interruption does not trigger, run OpenCode with debug: true in config. Check for "Voice overlap detected" messages. If none appear, sox may not have mic access.

Ready to try it?

Get started free →