m-bain / whisperX

WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
BSD 2-Clause "Simplified" License
12.45k stars 1.31k forks source link

TranscriptionOptions.__new__() missing 1 required positional argument: 'hotwords' #918

Open Tejes opened 1 week ago

Tejes commented 1 week ago

Since updating to WhisperX 3.1.6, I get the following error:

Traceback (most recent call last):
[...]
  File "/app/transcribe/models.py", line 168, in init_model
    self.model = whisperx.load_model(
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/whisperx/asr.py", line 335, in load_model
    default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: TranscriptionOptions.__new__() missing 1 required positional argument: 'hotwords'

Looks like this should be fixed by #904 . Staying at 3.1.5 in the meantime.

pramadikaegamo commented 1 day ago

If you want to keep running it with the latest version without having to wait for improvements to the WhisperX repository, you can use the following method:

asr_options = { "hotwords":None }

model = whisperx.load_model("large-v2", device, compute_type=compute_type, asr_options=asr_options)