GuidesHow to Improve Whisper Transcription Accuracy in OpenCode

How to Improve Whisper Transcription Accuracy in OpenCode

Whisper's accuracy depends heavily on the model size and your speaking environment. If /ptt transcriptions contain errors, these optimizations will help.

1
Upgrade to a larger model
The base model (142MB) is fast but error-prone. Run MODEL=small bash scripts/install-whisper.sh for the small model (466MB). Medium and large are also available.
2
Use OpenAI API
Set OPENAI_API_KEY in your environment. The plugin tries OpenAI API first when the key is present. OpenAI's Whisper API is much more accurate than any local model.
3
Set WHISPER_MODEL env var
If you downloaded a different model, point to it: export WHISPER_MODEL="$HOME/.local/bin/ggml-small.bin". Add to your shell profile for persistence.
4
Use plugin config
In opencode.json: [["opencode-interrupt-plugin", { "whisperModel": "medium" }]]. This avoids env var setup and keeps config in one place.
Tips
• For technical vocabulary (code, APIs, frameworks), OpenAI API is significantly more accurate than local models.
• Speak clearly and at a moderate pace. Whisper handles natural speech better than very fast or very slow input.
• Reduce background noise. Fans, music, and echo all reduce accuracy. A headset mic makes a big difference.

Troubleshooting

If transcriptions are still wrong after switching models, check the audio quality: sox /tmp/interrupt-ptt.wav -n stat shows volume levels. Low volume = poor transcription.

Ready to try it?

Get started free →