EEND-vector-clustering icon indicating copy to clipboard operation
EEND-vector-clustering copied to clipboard

fix Agg. Clustering ValueError with sample<2

Open Zenglinxiao opened this issue 4 years ago • 0 comments

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.

Zenglinxiao avatar Sep 17 '21 10:09 Zenglinxiao