Search code examples
pythondeep-learningopenai-whisper

How to set whisper.DecodingOptions language?


I'm trying to run whisper and I want to set the DecodingOptions.language with France (instead of using it's language detection).

I have tried to write:

options = whisper.DecodingOptions()
options.language = "fr"

but I'm getting error:

FrozenInstanceError: cannot assign to field 'language'

How can I set the language in DecodingOptions ?


Solution

  • You can change the language in the DecodingOptions in Whisper with the following command (as, for example, shown here):

    options = whisper.DecodingOptions(language="en")