27 using namespace kaldi;
31 "Adapt a PLDA object using unsupervised adaptation-data iVectors from a different\n" 32 "domain to the training data.\n" 34 "Usage: ivector-adapt-plda [options] <plda-in> <ivectors-rspecifier> <plda-out>\n" 35 "e.g.: ivector-adapt-plda plda ark:ivectors.ark plda.adapted\n";
40 po.Register(
"binary", &binary,
"Write output in binary mode");
48 if (po.NumArgs() != 3) {
53 std::string plda_rxfilename = po.GetArg(1),
54 ivector_rspecifier = po.GetArg(2),
55 plda_wxfilename = po.GetArg(3);
64 for (; !ivector_reader.Done(); ivector_reader.Next(), num_done++)
65 adaptor.
AddStats(1.0, ivector_reader.Value());
71 return (num_done != 0 ? 0 : 1);
72 }
catch(
const std::exception &e) {
73 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
void Register(OptionsItf *opts)
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
A templated class for reading objects sequentially from an archive or script file; see The Table conc...
This class takes unlabeled iVectors from the domain of interest and uses their mean and variance to a...
void AddStats(double weight, const Vector< double > &ivector)
void UpdatePlda(const PldaUnsupervisedAdaptorConfig &config, Plda *plda) const
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)