m-bain / whisperX

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

Diarization Pipeline not working #705

Open swagatamr opened 5 months ago

swagatamr commented 5 months ago

code:

diarize_model = whisperx.DiarizationPipeline(use_auth_token=YOUR_HF_TOKEN, device=device)

add min/max number of speakers if known

diarize_segments = diarize_model(audio)

diarize_model(audio, min_speakers=min_speakers, max_speakers=max_speakers)

result = whisperx.assign_word_speakers(diarize_segments, result) print(diarize_segments) print(result["segments"]) # segments are now assigned speaker


This is throwing error :

Could not download 'pyannote/speaker-diarization-3.1' pipeline. It might be because the pipeline is private or gated so make sure to authenticate. Visit https://hf.co/settings/tokens to create your access token and retry with:

Pipeline.from_pretrained('pyannote/speaker-diarization-3.1', ... use_auth_token=YOUR_AUTH_TOKEN)

If this still does not work, it might be because the pipeline is gated: visit https://hf.co/pyannote/speaker-diarization-3.1 to accept the user conditions.

even after accepting terms and conditions it is not working.

gillens commented 5 months ago

Hi, you need to generate a token and replace YOUR_HF_TOKEN with it, per the readme

swagatamr commented 5 months ago

Thanks