MahmoudAshraf97 / whisper-diarization

Automatic Speech Recognition with Speaker Diarization based on OpenAI Whisper
BSD 2-Clause "Simplified" License
3.43k stars 288 forks source link

Error: got an unexpected keyword argument 'max_new_tokens' #166

Closed shubhendumadhukar closed 7 months ago

shubhendumadhukar commented 7 months ago

Seem to be getting a new error recently, not sure if it's because of the recent commit

Traceback (most recent call last):
  File "/root/whisper-diarization/diarize.py", line 97, in <module>
    whisper_results, language = transcribe_batched(
  File "/root/whisper-diarization/transcription_helpers.py", line 63, in transcribe_batched
    whisper_model = whisperx.load_model(
  File "/usr/local/lib/python3.10/dist-packages/whisperx/asr.py", line 334, in load_model
    default_asr_options = faster_whisper.transcribe.TranscriptionOptions(**default_asr_options)
TypeError: TranscriptionOptions.__new__() got an unexpected keyword argument 'max_new_tokens'

OS: ubuntu22.04 Python: Python 3.10.12

transcriptionstream commented 7 months ago

It's due to the version of whisperx referenced in requirements.txt. You can resolve the issue by updating the whisperx line in requirements.txt from

git+https://github.com/m-bain/whisperX.git@d6562c26da467ca49866a4173c0e723f3837f367

to

git+https://github.com/m-bain/whisperX.git

For reference - https://github.com/MahmoudAshraf97/whisper-diarization/issues/165

shubhendumadhukar commented 7 months ago

Thanks, that works.