GuidesHow to Install Whisper.cpp for OpenCode

How to Install Whisper.cpp for OpenCode

Whisper.cpp provides fast, local speech-to-text transcription. The interrupt plugin uses it to transcribe walkie-talkie recordings. Everything runs offline on your machine.

1
Clone and build
The install script handles this: git clone --depth 1 https://github.com/ggerganov/whisper.cpp /tmp/whisper-cpp && cmake -S /tmp/whisper-cpp -B /tmp/whisper-cpp/build && cmake --build /tmp/whisper-cpp/build --config Release -j$(nproc)
2
Install the binary
Copy the built whisper binary to ~/.local/bin/: cp /tmp/whisper-cpp/build/bin/whisper-cli ~/.local/bin/whisper
3
Download a model
Download the base model: curl -fSL https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.bin -o ~/.local/bin/ggml-base.bin
4
Verify
Run whisper --help to confirm installation. The plugin auto-detects whisper on next restart.
Tips
• Model sizes: base (142MB), small (466MB), medium (1.5GB), large (3GB). Larger = more accurate, slower.
• Switch models anytime with WHISPER_MODEL=~/.local/bin/ggml-small.bin opencode
• Set OPENAI_API_KEY as an alternative — OpenAI API is used first when available and handles accents better.

Troubleshooting

If whisper fails silently, check the model file exists at the expected path. The plugin looks for ~/.local/bin/ggml-base.bin by default. Set WHISPER_MODEL env var to override.

Ready to try it?

Get started free →