Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinError 1314 (admin rights) #1473

Open
tomwagstaff-opml opened this issue Sep 26, 2023 · 14 comments
Open

WinError 1314 (admin rights) #1473

tomwagstaff-opml opened this issue Sep 26, 2023 · 14 comments

Comments

@tomwagstaff-opml
Copy link

tomwagstaff-opml commented Sep 26, 2023

Hi there,

I'd like to effectively re-open this issue which was closed automatically a few months ago:

OSError: [WinError 1314] A required privilege is not held by the client:

The issue is you need to be in a command prompt with elevated permissions.

Is it possible to remove this requirement so that users without admin rights can run pyannote?

Reference: https://discuss.huggingface.co/t/pyannote-speaker-diarization-winerror-1314-a-required-privilege-is-not-held-by-the-client/32624

Originally posted by @theyaoster in #1232 (comment)

@github-actions
Copy link

Thank you for your issue.You might want to check the FAQ if you haven't done so already.

Feel free to close this issue if you found an answer in the FAQ.

If your issue is a feature request, please read this first and update your request accordingly, if needed.

If your issue is a bug report, please provide a minimum reproducible example as a link to a self-contained Google Colab notebook containing everthing needed to reproduce the bug:

  • installation
  • data preparation
  • model download
  • etc.

Providing an MRE will increase your chance of getting an answer from the community (either maintainers or other power users).

Companies relying on pyannote.audio in production may contact me via email regarding:

  • paid scientific consulting around speaker diarization and speech processing in general;
  • custom models and tailored features (via the local tech transfer office).

This is an automated reply, generated by FAQtory

@hbredin
Copy link
Member

hbredin commented Sep 26, 2023

If you look closely at the trace, it seems to be an issue with speechbrain library.
Also, pyannote does not (yet) officially support Windows (because I don't have a Windows machine myself).

@tomwagstaff-opml
Copy link
Author

Ah thanks, I see they have several open issues about it e.g. speechbrain/speechbrain#1155

I guess this means there's nothing you can do for now, but is it helpful to leave this issue open for if/when they produce a fix? (Because I imagine some follow-up work would be required to integrate their update...)

@kaixxx
Copy link

kaixxx commented Oct 4, 2023

Look at this PR: #1359 and especially my comment: #1359 (comment)

This is how I managed to get the pyannote.audio speaker diarization pipeline running on windows without admin rights. I have not tested this with version 3 though...

@tomwagstaff-opml
Copy link
Author

Thanks for this @kaixxx,

But I'm afraid I can't find a pyannote_config.yaml anywhere in my pyannote package files. I've looked through funboarder13920's fork of pyannote too, and I can't find any such file there either.

Could you possibly elaborate on how this solution might work with the current version of pyannote? (pyannote-audio 2.1.1 in my case)

@kaixxx
Copy link

kaixxx commented Oct 13, 2023

Sorry for the confusion. In the original tutorial on offline use (https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/applying_a_pipeline.ipynb), the file is simply called "config.yaml". I must have renamed it in my app to make it more clear that this belongs to pyannote. You can name it anyway you want.
This config.yaml is also the file funboarder13920 is talking about in the PR linked above: "You need to specify the path of your local files in the config..." I hope this becomes clearer now.

But the main point of my suggestion was something different: I guess that pyannote needs an elevated prompt because speechbrain wants to create a symlink to the file "custom.py". In the other thread, I described how I got around that. I hope that helps.

@tomwagstaff-opml
Copy link
Author

Thanks @kaixxx, this set me on the right track!

Once I'd created "custom.py" in the speechbrain cache, in my case located at %USERPROFILE%\.cache\torch\pyannote\speechbrain I was prompted to move files there from the huggingface cache, in my case `%USERPROFILE%.cache\huggingface\hub\models--speechbrain--spkrec-ecapa-voxceleb\snapshots\5c0be3875fda05e81f3c004ed8c7c06be308de1e'

There were 5 files, each created sequentially so I had to run the code 5 times to get the next error prompt. In one case I also had to rename the file. But with these all in place, the code ran fine without throwing any errors about admin permissions. 💪

@EPI-JHS
Copy link

EPI-JHS commented Mar 5, 2024

I'm having a similar issue, can I check what you had in your config.yaml @tomwagstaff-opml? Appreciate anything you can share, I have tried many different configurations..

@kaixxx
Copy link

kaixxx commented Mar 5, 2024

My config is here (for pyannote 2, so a bit outdated): https://github.com/kaixxx/noScribe/blob/main/models/pyannote_config.yaml

@EPI-JHS
Copy link

EPI-JHS commented Mar 6, 2024

Thank you. I've gone as far as to download the models folder whole from your repo, then used it like so:

from pyannote.audio import Pipeline
# Load the pipeline with the local configuration (no files should be downloaded)
pipeline = Pipeline.from_pretrained('models/pyannote_config.yaml')

It returns this error:

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './models/torch/pyannote/speechbrain'. Use `repo_type` argument if needed.

Which is quite similar to the one I was finding before..

@EPI-JHS
Copy link

EPI-JHS commented Mar 6, 2024

If I change the config to the below:

pipeline:
  name: pyannote.audio.pipelines.SpeakerDiarization
  params:
    clustering: AgglomerativeClustering
    embedding: ./models/torch/pyannote/speechbrain/**embedding_model.ckpt**
    embedding_batch_size: 32
    embedding_exclude_overlap: False
    segmentation: ./models/pytorch_model.bin
    segmentation_batch_size: 32

params:
  clustering:
    method: centroid
    min_cluster_size: 15
    threshold: 0.7153814381597874
  segmentation:
    min_duration_off: 0.5817029604921046
    threshold: 0.4442333667381752

I get the 'modules architecture' error instead:

module_name: str = loaded_checkpoint["pyannote.audio"]["architecture"]["module"]
                       ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'pyannote.audio'

@kaixxx
Copy link

kaixxx commented Mar 6, 2024

pipeline = Pipeline.from_pretrained('models/pyannote_config.yaml')

You might need to give it a full path. Look here how I use it: https://github.com/kaixxx/noScribe/blob/main/diarize.py

@EPI-JHS
Copy link

EPI-JHS commented Mar 21, 2024

Thanks, I've tried several ways now and I still get errors.. I've cloned your branch of pyannote too, still no luck..
image

This is the closest I get and I still receive an error suggesting use_auth is necessary from model.py...

@EPI-JHS
Copy link

EPI-JHS commented Mar 21, 2024

I think I found a way, thank you kaixxx for the help! It involved removing the reference to speechbrain entirely and replacing it with wespeakerc as the embedding model.

For anyone who might be having trouble, try replacing 'speechbrain' with 'wespeakerc' the config yaml should look like this:

pipeline:
  name: pyannote.audio.pipelines.SpeakerDiarization
  params:
    clustering: AgglomerativeClustering
    embedding: ./setup/models/torch/pyannote/wespeakerc/pytorch_model.bin
    embedding_batch_size: 32
    embedding_exclude_overlap: False
    segmentation: ./setup/models/torch/pyannote/segmentation/pytorch_model.bin
    segmentation_batch_size: 32

params:
  clustering:
    method: centroid
    min_cluster_size: 15
    threshold: 0.7153814381597874
  segmentation:
    min_duration_off: 0.5817029604921046
    threshold: 0.4442333667381752

You can download the model bin for wespeaker here: https://huggingface.co/pyannote/wespeaker-voxceleb-resnet34-LM/tree/main

Also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants