GuidesInstalling sox for OpenCode Interrupt

Installing sox for OpenCode Interrupt

sox (Sound eXchange) provides the microphone pipeline that the interrupt plugin uses for both walkie-talkie recording and voice activity detection.

1
Install sox
Ubuntu/Debian: sudo apt install sox. macOS: brew install sox. Arch: sudo pacman -S sox. Fedora: sudo dnf install sox.
2
Test mic access
Run sox -d -t wav - | sox -t wav - -n stat and speak — you should see RMS levels. Press Ctrl+C to stop.
3
Check audio groups (Linux)
Ensure your user is in the audio group: groups $USER | grep audio. If not: sudo usermod -a -G audio $USER && exec su -l $USER.
4
Set default device
sox uses the system default input device. On Linux with PulseAudio, set the default source: pactl set-default-source "alsa_input.pci-..."
Tips
• On macOS, grant mic permission to Terminal/iTerm2 in System Settings > Privacy > Microphone.
• If sox fails with "default audio device cannot be opened", try specifying the device: sox -d -t wav - --default-device
• The interrupt plugin uses sox's "rec" command equivalent internally via the SoX subprocess pipeline.

Troubleshooting

Run sox --help to verify installation. If the command is not found, the package may be named "sox" on most systems but "Sound eXchange" on some older package managers.

Ready to try it?

Get started free →