How do I get whisper to not-translate #3965
|
I made a transcription of an audio mostly in English but about 90 seconds of German. whisper translated it into English. I wanted the German. I didn't use the -tr switch. |
Replies: 1 comment 1 reply
|
This is probably not the So if you ran the default command, or used an English-only model such as For German text to stay German, use a multilingual model, not an ./build/bin/whisper-cli -m models/ggml-base.bin -l auto -f audio.wavIf the audio is mostly English with only one German section, auto-detection may still choose English for the whole file. In that case the most reliable workaround is to split the 90-second German part and run that segment separately with: ./build/bin/whisper-cli -m models/ggml-base.bin -l de -f german-part.wavThen run the English sections with Short version: use a multilingual model and If this explains the English output, please mark it as answered so others know to check the model and |
This is probably not the
-trflag. Inwhisper.cpp,-tr/--translateexplicitly asks Whisper to translate the source language to English, but the CLI also has a separate language setting. The current CLI help shows-l LANG, --language LANGand its default isen.So if you ran the default command, or used an English-only model such as
ggml-base.en.bin, the decoder is being pushed toward English output. A German section in a mostly English file can then come out as English even though you did not pass-tr.For German text to stay German, use a multilingual model, not an
.enmodel, and do not force the whole file to English. For example: