Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you get this to translate instead of just transcribe?


To 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.


Just specify language and record an audio in another language.

>result = model.transcribe("audio.wav", language="english")


That 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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: