Whisper models can translate as well as transcribe: give whisper.cpp a recording in another language and the translate flag, and it returns English text. The flag only outputs English, so it is for understanding a recording, not for producing another language.
What you need
- whisper.cpp built, with whisper-cli available
- A multilingual Whisper model, for example ggml-medium.bin
- A non-English audio file converted to 16 kHz mono 16-bit WAV
Step 1: Convert the audio first
Convert the recording to 16-bit WAV with ffmpeg, for example ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav. whisper-cli expects that format.
Step 2: Run with the translate flag
Run whisper-cli -m models/ggml-medium.bin -f output.wav -l de –translate, using the language code of the recording. The -tr flag is the short form of –translate.
Step 3: Check the English result
Read the English output and check it against what you know of the recording. Names and numbers deserve a second look, because translation can garble them.
Worked example: synthetic translation
The table below is a synthetic example. It shows the expected result of translating audio; no audio was translated.
| Check | Expected | Result |
|---|---|---|
| Audio language | German | Detected |
| Output language | English | Pass |
| Meaning kept | Main points kept | Pass |
| Names and numbers | Checked by hand | Pass |
Expected result (UNTESTED). the German recording is detected, the output is in English, the main points are kept, and names and numbers are checked by hand. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- The translate flag only outputs English; for another target language, add a translation step after.
- Use a multilingual model, not an English-only .en model, or there is nothing to translate from.
- Translation is a guess, not a certified translation; check it before quoting it.
