More details on whisper.decode() for translation #2728
-
|
I'm looking for more info on the whisper.decode() function as well as log_mel_spectrogram() so I can send flags re translation. I see how to recognize a language on input file and convert from a language but not TO a specified one. Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
misutoneko
Feb 12, 2026
Replies: 1 comment 5 replies
-
|
AFAICR the target language for translation is always english. If you need some other language you will need to do it separately. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In "transcribe" mode, the source and target language are the same.
In "translate" mode it's as I said, the target language can't be set, it's always english.
For example, if you have the source audio in spanish and want the resulting text to be in german, you would use "transcribe" to get the spanish transcript. You will then have to implement the spanish-to-german translation yourself, as a separate step (using opus-mt, madlad400, whatever).
(Or alternatively, if you use "translate" mode you will get the english text and you will then have to translate that to german yourself. But the timing information might suffer in this case.)
Getting the timing right for the translated version might…