Comments (9)
Ah I see.
Spectral clustering (or to be more specific, the eigen-gap criterion) doesn't work well at distinguishing single speaker vs multi speakers. We usually always set min_clusters=2
for spectral clustering.
To handle single speaker utterances, what we do is:
- We use an RNN-T speaker turn detection model to detect speaker turns.
- If there is at least one highly-confident speaker turn, then we trigger spectral clustering, with `min_clusters=2.
- Otherwise, we assume there is only one single speaker.
However since the RNN-T speaker turn model is not open sourced, I guess we will have to do something else to handle single speaker cases.
A few ideas I can think of:
- Use some other implementations of speaker turn/change detection.
- Pre-processing: always run another faster clustering (e.g. hierarchical) first to decide whether there are at least two speakers.
- Pre-processing: compute max-distance between any pair of embeddings (or perhaps only neighboring pairs?) and threshold that max-distance to decide whether there are at least two speakers.
- Post-processing (the one you mentioned): if n_clusters=2, compare centroids with simple threshold.
from spectralcluster.
I can update this library to implement some of these ideas. Stay tuned!
from spectralcluster.
I see from the GitHub logs that you have been working on this. Thanks!
What about fitting the values of the affinity matrix with
- 1-gaussian GMM
- 2-gaussians GMM
and use the BIC criterion to decide which is best.
If 2-gaussians GMM is best, it would mean that there are actually two modes in the distribution of affinity value (one for intra cluster affinity, one for inter cluster affinity)... and therefore strictly more than one cluster. Otherwise there is probably just one cluster.
This approach (if succesfull) would have the extra benefit of not relying on any additional threshold.
from spectralcluster.
That's a good idea! I will give it a try.
from spectralcluster.
I've changed the default value of single_cluster_condition
to AffinityGmmBic
.
from spectralcluster.
Just realized one thing.
The diagonals of the affinity matrix will be 1. So if we use GMM BIC, it's very likely it's always going to be GMM-2 wins, as the diagonals would be significantly larger than anything else.
We should remove/crop diagonal before we fit GMM to the affinity values.
from spectralcluster.
Good point. Same goes for values close to the diagonal in case embeddings are extracted using an overlapping sliding window.
from spectralcluster.
OK, I added a parameter single_cluster_affinity_diagonal_offset
, which defaults to 1
from spectralcluster.
Please use version 0.2.11
.
from spectralcluster.
Related Issues (20)
- Creating an Initial Cluster and predicting using that cluster HOT 1
- Contraint Matrix Question HOT 1
- question about clustering every turn detection will change previous prediction ? HOT 2
- How to deal with the speaker_turn_scores of the constraint_matrix ? HOT 1
- Configs from your ICASSP 2018 paper HOT 2
- Question about this formula in paper mentioned HOT 2
- UnboundLocalError: local variable 'best_p_percentile_index' referenced before assignment HOT 4
- Threshold used for Agglomerative fallback clusterer HOT 3
- How to not use any single_cluster_condition? HOT 3
- Is autotune useful when the number of clusters is known in advance? HOT 6
- Spectral clustering is too slow & expensive when sequence is long
- Config for Auto-Tune HOT 1
- Is there a way to monitor the progress of the predict() method? HOT 1
- TypeError: constraint matrix must be a numpy array HOT 2
- predicted cluster number always be 2 HOT 2
- Tracking speakers in time HOT 3
- Constrained MultiStageClusterer HOT 1
- Quality of Streaming clustering
- Autotune proxy condition in spectral_cluster.py HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectralcluster.