26 int main(
int argc,
char *argv[]) {
27 using namespace kaldi;
31 "Copy a PLDA object, possibly applying smoothing to the within-class\n" 34 "Usage: ivector-copy-plda <plda-in> <plda-out>\n" 35 "e.g.: ivector-copy-plda --smoothing=0.1 plda plda.smooth0.1\n";
41 po.
Register(
"smoothing", &smoothing,
"Factor used in smoothing within-class " 42 "covariance (add this factor times between-class covar)");
43 po.
Register(
"binary", &binary,
"Write output in binary mode");
55 std::string plda_rxfilename = po.
GetArg(1),
56 plda_wxfilename = po.
GetArg(2);
65 }
catch(
const std::exception &e) {
66 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].
void Register(const std::string &name, bool *ptr, const std::string &doc)
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void SmoothWithinClassCovariance(double smoothing_factor)
This function smooths the within-class covariance by adding to it, smoothing_factor (e...
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables.
int main(int argc, char *argv[])
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility.
void Register(OptionsItf *opts)
int NumArgs() const
Number of positional parameters (c.f. argc-1).
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)