3 ms·
How do you get this to translate instead of just transcribe?
by berberous 4y ago
How do you get this to translate instead of just transcribe?
- paraschopra 4y agoJust specify language and record an audio in another language. >result = model.transcribe("audio.wav", language="english")
- berberous 4y agoThat actually seems to set the language for it to transcribe (as opposed to it guessing), with the following triggering a translation to English: result = model.transcribe("audio.wav", task="translate") But your post helped me figure out the above, so thank you!
- tekacs 4y agoTo be more specific than the above: 1. Make sure you're using a model that isn't suffixed with `.en` (`base`, not `base.en). 2. Use `model.transcribe(your_input_audio, language='Japanese', task='translate')` ... with the appropriate input language.