EEND-vector-clustering
EEND-vector-clustering copied to clipboard
fix Agg. Clustering ValueError with sample<2
Currently, the following Error might arise when a trained EEND-vector model is used to do inference on an audio record with only a single speaker.
ValueError: Found array with 1 sample(s) (shape=(1, 1)) while a minimum of 2 is required by AgglomerativeClustering.
This PR fixes this issue by adding an extra verification to make sure min_n_samples is always greater than two which avoids doing clustering on one single sample.