26 int main(
int argc,
char *argv[]) {
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");
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++)
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 PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
int main(int argc, char *argv[])
void Register(const std::string &name, bool *ptr, const std::string &doc)
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...
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables.
This class takes unlabeled iVectors from the domain of interest and uses their mean and variance to a...
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility.
void AddStats(double weight, const Vector< double > &ivector)
int NumArgs() const
Number of positional parameters (c.f. argc-1).
void UpdatePlda(const PldaUnsupervisedAdaptorConfig &config, Plda *plda) const
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)