Pyannote/speaker-diarization - [WinError 1314] A required privilege is not held by the client

Hi,

I’m trying to use pyannote/speaker-diarization on a set of audiofile interview with two speakers. My goal is to identify who speaks when and transcript it in a text.

To do so I installed pyannote following the instruction found on pyannote github in a new conda environnement.

I first use anaconda prompt to login with the command huggingface-cli login and then I enter my token and get a validation.

After I run the code found here

from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained(“pyannote/speaker-diarization”,
use_auth_token=True
)

And I get the error :


OSError Traceback (most recent call last)
Cell In[22], line 1
----> 1 pipeline = Pipeline.from_pretrained(“pyannote/speaker-diarization”,
2 use_auth_token=True
3 )

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\pyannote\audio\core\pipeline.py:129, in Pipeline.from_pretrained(cls, checkpoint_path, hparams_file, use_auth_token, cache_dir)
127 params = config[“pipeline”].get(“params”, {})
128 params.setdefault(“use_auth_token”, use_auth_token)
→ 129 pipeline = Klass(**params)
131 # freeze parameters
132 if “freeze” in config:

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\pyannote\audio\pipelines\speaker_diarization.py:165, in SpeakerDiarization.init(self, segmentation, segmentation_duration, segmentation_step, embedding, embedding_exclude_overlap, clustering, embedding_batch_size, segmentation_batch_size, der_variant, use_auth_token)
162 metric = “not_applicable”
164 else:
→ 165 self._embedding = PretrainedSpeakerEmbedding(
166 self.embedding, use_auth_token=use_auth_token
167 )
168 self._audio = Audio(sample_rate=self._embedding.sample_rate, mono=True)
169 metric = self._embedding.metric

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\pyannote\audio\pipelines\speaker_verification.py:488, in PretrainedSpeakerEmbedding(embedding, device, use_auth_token)
456 “”“Pretrained speaker embedding
457
458 Parameters
(…)
484 >>> embeddings = get_embedding(waveforms, masks=masks)
485 “””
487 if isinstance(embedding, str) and “speechbrain” in embedding:
→ 488 return SpeechBrainPretrainedSpeakerEmbedding(
489 embedding, device=device, use_auth_token=use_auth_token
490 )
492 elif isinstance(embedding, str) and “nvidia” in embedding:
493 return NeMoPretrainedSpeakerEmbedding(embedding, device=device)

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\pyannote\audio\pipelines\speaker_verification.py:249, in SpeechBrainPretrainedSpeakerEmbedding.init(self, embedding, device, use_auth_token)
246 self.device = device or torch.device(“cpu”)
247 self.use_auth_token = use_auth_token
→ 249 self.classifier_ = SpeechBrain_EncoderClassifier.from_hparams(
250 source=self.embedding,
251 savedir=f"{CACHE_DIR}/speechbrain",
252 run_opts={“device”: self.device},
253 use_auth_token=self.use_auth_token,
254 )

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\speechbrain\pretrained\interfaces.py:342, in Pretrained.from_hparams(cls, source, hparams_file, pymodule_file, overrides, savedir, use_auth_token, revision, **kwargs)
340 clsname = cls.name
341 savedir = f"./pretrained_models/{clsname}-{hashlib.md5(source.encode(‘UTF-8’, errors=‘replace’)).hexdigest()}"
→ 342 hparams_local_path = fetch(
343 hparams_file, source, savedir, use_auth_token, revision
344 )
345 try:
346 pymodule_local_path = fetch(
347 pymodule_file, source, savedir, use_auth_token, revision
348 )

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\site-packages\speechbrain\pretrained\fetching.py:135, in fetch(filename, source, savedir, overwrite, save_filename, use_auth_token, revision)
133 sourcepath = pathlib.Path(fetched_file).absolute()
134 _missing_ok_unlink(destination)
→ 135 destination.symlink_to(sourcepath)
136 return destination

File ~\Anaconda3\envs\Alex\envs\pyannote\lib\pathlib.py:1384, in Path.symlink_to(self, target, target_is_directory)
1382 if self._closed:
1383 self._raise_closed()
→ 1384 self._accessor.symlink(target, self, target_is_directory)

OSError: [WinError 1314] A required privilege is not held by the client: ‘C:\Users\Alex\.cache\huggingface\hub\models–speechbrain–spkrec-ecapa-voxceleb\snapshots\5c0be3875fda05e81f3c004ed8c7c06be308de1e\hyperparams.yaml’ → ‘C:\Users\Alex\.cache\torch\pyannote\speechbrain\hyperparams.yaml’

I thought I needed to accept the Terms and condition on huggingface for the spkrec-ecapa-voxceleb model but I couldn’t find something to accept.

I scroll the web before posting this message but found nothing.

I’m running on windows 10, jupyter notebook with anaconda and python 3.8.
Here are the package installed

Can you help me to solve the error ?

Thanks a lot !

Alex

1 Like

I found the answer !

Jupyter notebook need to be run with admin privilege. Solution is here

1 Like

If you trying to run in anaconda prompt or cmd ,launch as run as administrator.

Hey, I am running into the same issue and unfortunately cannot run it with admin privilege. Do you know any other solution to this issue?

2 Likes