m-bain / whisperX

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

404 Client Error for speaker-embedding.onnx #666

Open eliich opened 10 months ago

eliich commented 10 months ago
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/pyannote/wespeaker-voxceleb-resnet34-LM/resolve/main/speaker-embedding.onnx

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "my_whisperx_script.py", line 33, in <module>
    diarize_model = whisperx.DiarizationPipeline(use_auth_token="hf_#####", device=device)
  ... [additional traceback lines] ...
  File "huggingface_hub/file_download.py", line 1631, in get_hf_file_metadata
    r = _request_wrapper( ...
  File "huggingface_hub/utils/_errors.py", line 296, in hf_raise_for_status
    raise EntryNotFoundError(message, response) from e
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: ...)

Is the speaker-embedding.onnx file still available at the specified URL? Could there be a permission issue or has the file been moved?

ulfkemmsies commented 10 months ago

I also have this error. This seems like a simple fix!

Lucidology commented 7 months ago

I have this error as well

Lucidology commented 7 months ago

Fix: This bug was caused by the fix for another bug from https://github.com/m-bain/whisperX/issues/499

It said to:

pip install pyannote.audio==3.0.1
pip uninstall onnxruntime
pip install --force-reinstall onnxruntime-gpu

I did:

pip uninstall pyannote.audio
pip install pyannote.audio

And now it works, I can fully transcribe and diarize a sound file, I have not tested if this still has the problem from 499 where diarization is slow and runs on the CPU. There is probably a way to pass in the device using python code or maybe just hack the code.

SeeknnDestroy commented 6 months ago

hi @eliich, your pyannote.audio version should match with the diarization pipeline model. please chech it via pip show pyannote.audio, if it shows:

Name: pyannote.audio
Version: 3.0.1

then use:

diarize_model = whisperx.DiarizationPipeline(model_name="pyannote/speaker-diarization-3.0", use_auth_token=hf_token, device=self.device)
diarize_segments = diarize_model(audio)
result = whisperx.assign_word_speakers(diarize_segments, result)

let me know if it helps!

mshakirDr commented 3 months ago

Commented out line 218 in transcribe.py and replaced with the above mentioned line. The diarization was quickly performed. No 404 error.

       #diarize_model = DiarizationPipeline(use_auth_token=hf_token, device=device)
        diarize_model = DiarizationPipeline(model_name="pyannote/speaker-diarization-3.0", use_auth_token=hf_token, device=device)