Closed hbredin closed 2 years ago
I can confirm that this happens when trying to cluster
I see. This is because this spectral clustering implementation does not expect too few embeddings or min_clusters = 1.
In our internal implementation, we only use spectral clustering when the speaker turn detection model has detected a speaker turn, and there are at least X embeddings.
I can implement a fallback logic here. If the number of embeddings is smaller than X, we use a different clustering algorithm (e.g. we used Naive clustering, here we could use hierarchical).
Fixed. Now you can pass in fallback_options
as an additional argument.
🎉 Thanks!
FYI, while running your
pyannote.audio
PR, I got the following error that I have yet to narrow down.https://github.com/wq2012/SpectralCluster/blob/06504bd15890d21380cab0ff9b80cd437d1402a1/spectralcluster/autotune.py#L96
It probably is because the pipeline tries to cluster a small (like less than 2) number of embeddings but I will confirm this once I know more.
In the meantime, maybe it is obvious to you why this might happen?