New Tool Radar

Local Speech & Transcription

How to Transcribe an Opus File With whisper.cpp and FFmpeg

Convert an Opus recording to 16-bit WAV with ffmpeg, then transcribe it with whisper.cpp, using the FFmpeg-enabled build when needed.

Schematic diagram with four steps: convert the Opus file to 16-bit WAV with ffmpeg, check the WAV plays, transcribe it with whisper-cli, then compare the transcript with the recording.

whisper-cli runs only with 16-bit WAV files, so an Opus recording — the format many voice apps save — cannot go straight in. Convert it first with ffmpeg, then transcribe the WAV. whisper.cpp also has an FFmpeg support option for builds that read audio through ffmpeg directly.

Convert the Opus file, then transcribe

Convert the file with ffmpeg: ffmpeg -i input.opus -ar 16000 -ac 1 -c:a pcm_s16le output.wav — 16 kHz, mono, 16-bit PCM, the format whisper-cli wants. Then run whisper-cli on the WAV: ./build/bin/whisper-cli -f output.wav. The README’s quick start gives the same ffmpeg command for an mp3 input; the opus input works the same way.

ffmpeg -i input.opus -ar 16000 -ac 1 -c:a pcm_s16le output.wav
./build/bin/whisper-cli -f output.wav
# builds can also enable FFmpeg support (WHISPER_FFMPEG) to read audio directly

Check the converted WAV before transcribing: play a few seconds and confirm it is the right recording at the right speed. A wrong sample rate makes the transcript sound like the wrong person — the words come out garbled, not just slow.

Try it: four checks

Check What you should see If you do not see it
Converted ffmpeg writes the WAV file 16 kHz, mono, 16-bit PCM
WAV checked The WAV plays correctly Check a few seconds
Transcribed whisper-cli writes a transcript Check the output file
Words right The transcript matches the recording Compare by ear

Expected result. We checked the whisper.cpp README, which says whisper-cli runs only with 16-bit WAV files, gives the ffmpeg conversion command, and has an FFmpeg support section (WHISPER_FFMPEG). We did not transcribe audio on this machine.

Limits

This guide covers the convert-then-transcribe route only. The sample rate must be 16 kHz for the model. We did not test any transcription ourselves.

Sources

See all