paddlespeech.vector.cluster.plda module
A popular speaker recognition/diarization model (LDA and PLDA).
- Relevant Papers
This implementation of PLDA is based on the following papers.
- PLDA model Training
Ye Jiang et. al, "PLDA Modeling in I-Vector and Supervector Space for Speaker Verification," in Interspeech, 2012.
Patrick Kenny et. al, "PLDA for speaker verification with utterances of arbitrary duration," in ICASSP, 2013.
- PLDA scoring (fast scoring)
Daniel Garcia-Romero et. al, “Analysis of i-vector length normalization in speaker recognition systems,” in Interspeech, 2011.
Weiwei-LIN et. al, "Fast Scoring for PLDA with Uncertainty Propagation," in Odyssey, 2016.
Kong Aik Lee et. al, "Multi-session PLDA Scoring of I-vector for Partially Open-Set Speaker Detection," in Interspeech 2013.
- Credits
This code is adapted from: https://git-lium.univ-lemans.fr/Larcher/sidekit
- class paddlespeech.vector.cluster.plda.Ndx(ndx_file_name='', models=array([], dtype=float64), testsegs=array([], dtype=float64))[source]
Bases:
object
A class that encodes trial index information. It has a list of model names and a list of test segment names and a matrix indicating which combinations of model and test segment are trials of interest.
Methods
filter
(modlist, seglist, keep)Removes some of the information in an Ndx.
validate
()Checks that an object of type Ndx obeys certain rules that must always be true.
save_ndx_object
- class paddlespeech.vector.cluster.plda.PLDA(mean=None, F=None, Sigma=None, rank_f=100, nb_iter=10, scaling_factor=1.0)[source]
Bases:
object
A class to train PLDA model from embeddings.
The input is in paddlespeech.vector.cluster.diarization.EmbeddingMeta format. Trains a simplified PLDA model no within-class covariance matrix but full residual covariance matrix.
Methods
plda
([emb_meta, output_file_name])Trains PLDA model with no within class covariance matrix but full residual covariance matrix.
scoring
(enroll, test, ndx[, ...])Compute the PLDA scores between to sets of vectors.
- plda(emb_meta=None, output_file_name=None)[source]
Trains PLDA model with no within class covariance matrix but full residual covariance matrix.
- scoring(enroll, test, ndx, test_uncertainty=None, Vtrans=None, p_known=0.0, scaling_factor=1.0, check_missing=True)[source]
Compute the PLDA scores between to sets of vectors. The list of trials to perform is given in an Ndx object. PLDA matrices have to be pre-computed. i-vectors/x-vectors are supposed to be whitened before.
- class paddlespeech.vector.cluster.plda.Scores(scores_file_name='')[source]
Bases:
object
A class for storing scores for trials. The modelset and segset fields are lists of model and test segment names respectively. The element i,j of scoremat and scoremask corresponds to the trial involving model i and test segment j.