Open tomwagstaff-opml opened 1 year ago
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:
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:
This is an automated reply, generated by FAQtory
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).
Ah thanks, I see they have several open issues about it e.g. https://github.com/speechbrain/speechbrain/issues/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...)
Look at this PR: https://github.com/pyannote/pyannote-audio/pull/1359 and especially my comment: https://github.com/pyannote/pyannote-audio/pull/1359#issuecomment-1548715157
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...
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)
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.
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. 💪
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..
My config is here (for pyannote 2, so a bit outdated): https://github.com/kaixxx/noScribe/blob/main/models/pyannote_config.yaml
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..
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'
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
Thanks, I've tried several ways now and I still get errors.. I've cloned your branch of pyannote too, still no luck..
This is the closest I get and I still receive an error suggesting use_auth is necessary from model.py...
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:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi there,
I'd like to effectively re-open this issue which was closed automatically a few months ago:
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 https://github.com/pyannote/pyannote-audio/issues/1232#issuecomment-1407039921