GuidesUsing OpenCode Interrupt with GPT-4o

Using OpenCode Interrupt with GPT-4o

GPT-4o pairs naturally with the interrupt plugin. Streaming TTS voices GPT-4o's responses as they arrive, and voice interruption lets you redirect on the fly.

1
Set up GPT-4o in OpenCode
Configure your OpenAI API key and GPT-4o model in OpenCode. The interrupt plugin layers on top of this configuration.
2
Add the plugin
Add "opencode-interrupt-plugin" to your opencode.json plugin array. No special GPT-4o-specific config needed.
3
Enable TTS
TTS is on by default. GPT-4o's responses are spoken as they stream in. Use /tts-off to disable if you want text-only.
4
Interrupt and redirect
Speak while GPT-4o is responding — the plugin detects your voice, stops TTS, aborts generation. Or use /ptt for a deliberate toggle.
Tips
• GPT-4o's fast response generation means near-instant TTS output. Interruption happens within ~100ms of you speaking.
• Set OPENAI_API_KEY in your environment for whisper transcription. OpenAI API transcription handles technical terms better than local models.
• The plugin injects correction context as system instructions — GPT-4o handles these seamlessly.

Troubleshooting

If TTS lags behind GPT-4o's responses, increase the TTS rate with EDGE_TTS_RATE="+50%". This makes speech output catch up to text generation.

Ready to try it?

Get started free →