m-bain / whisperX

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

AttributeError: 'SpeakerDiarization' object has no attribute 'to' #370

Open MyraBaba opened 1 year ago

MyraBaba commented 1 year ago

Traceback (most recent call last): File "test.py", line 31, in diarize_model = whisperx.DiarizationPipeline(use_auth_token="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", device=device) File "/home/sabuhigurbani/.local/lib/python3.8/site-packages/whisperx/diarize.py", line 16, in init self.model = Pipeline.from_pretrained(model_name, use_auth_token=use_auth_token).to(device) File "/home/sabuhigurbani/.local/lib/python3.8/site-packages/pyannote/pipeline/pipeline.py", line 100, in getattr raise AttributeError(msg) AttributeError: 'SpeakerDiarization' object has no attribute 'to' Just executed example on: https://github.com/m-bain/whisperX#python-usage--

Mzaxd commented 1 year ago

same problem

kiwikia commented 5 months ago

You might get this error if you haven't accepted the user agreements, as mentioned in the writeup =>

To enable Speaker Diarization, include your Hugging Face access token (read) that you can generate from Here after the --hf_token argument and accept the user agreement for the following models: Segmentation and Speaker-Diarization-3.1 (if you choose to use Speaker-Diarization 2.x, follow requirements here instead.)