Add suport for pyannote diarization 3.0 embedding model #184
Replies: 1 comment 2 replies
-
Hi @sorgfresser, thank you for posting this, you make an excellent point. Would it be even possible to use this as an embedding model?Currently there's no possibility to use this model. The immediate reason is that, as you mention, the pyannote API has changed and this should be updated in the code.
If so, is it possible with the current diart already?No, this would require an integration effort with some coding. It's certainly doable though, and not very complicated IMO If it is technically possible but diart can't do it yet, can you point me in the gentle direction what I would have to change? I'd be willing to create a PR for this.With pleasure! I think I answered this question a bit generally in the first part. In any case, I'll try to point you to the exact pieces of code that would have to change:
from pyannote.audio.pipelines.speaker_verification import PretrainedSpeakerEmbedding
get_embedding = PretrainedSpeakerEmbedding("pyannote/embedding")
And that's it, with these two changes you should be able to run the new model. I would greatly appreciate a PR with this feature! If you run into any troubles during the implementation let me know and I'll help with whatever I can. You can also create a draft PR from an initial implementation so we can discuss the code more easily right there. Thank you! Looking forward to seeing that PR :) |
Beta Was this translation helpful? Give feedback.
-
TLDR
ONNX-Embedding model as specified in the new pyannote diarization pipeline can not be loaded with
EmbeddingModel.from_pyannote
. Multiple questions for this, they are at the end.What's the issue?
I'm trying to get diart to work with the new pyannote 3.0 models. My major issue is the embedding model which is onnx for
pyannote/speaker-diarization-3.0
.Whenever I try to load
hbredin/wespeaker-voxceleb-resnet34-LM
as an embedding model to pass it intoSpeakerDiarizationConfig
I getWhich is fair since the model is named
speaker-embedding.onnx
, as suchpytorch_model.bin
does not exist.In pyannote there has been the addition of
WeSpeakerPretrainedSpeakerEmbedding
as a pipeline for this case. As such, I tried to initialize this pipeline beforehand and simply pass the pipeline to the EmbeddingModel.from_pyannote but since it is a pipeline and not a model thepyannote_loader.get_model()
does not work asisinstance(model, Model)
is false and pytorch lightning can't load onnx models.Questions
Beta Was this translation helpful? Give feedback.
All reactions