Skip to content

Commit 287e249

Browse files
david-ryan-snyderdanpovey
authored andcommitted
[src] Make vector-compute-plda check that num-ivectors > plda-dim, and die if not (kaldi-asr#2591)
1 parent 04027ee commit 287e249

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ivectorbin/ivector-compute-plda.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ int main(int argc, char *argv[]) {
8585
num_utt_done++;
8686
}
8787
}
88+
8889
if (ivectors.size() == 0) {
8990
KALDI_WARN << "Not producing output for speaker " << spk
9091
<< " since no utterances had iVectors";
@@ -101,6 +102,10 @@ int main(int argc, char *argv[]) {
101102
}
102103
}
103104

105+
if (num_utt_done <= plda_stats.Dim())
106+
KALDI_ERR << "Number of training iVectors is not greater than their "
107+
<< "dimension, unable to estimate PLDA.";
108+
104109
KALDI_LOG << "Accumulated stats from " << num_spk_done << " speakers ("
105110
<< num_spk_err << " with no utterances), consisting of "
106111
<< num_utt_done << " utterances (" << num_utt_err

0 commit comments

Comments
 (0)