Imported from https://github.com/cvqluu/nn-similarity-diarization