24 int main(
int argc,
char *argv[]) {
25 using namespace kaldi;
28 "Initialize fMPE transform (to zero)\n" 29 "Usage: fmpe-init [options...] <diag-gmm-in> <fmpe-out>\n" 30 "E.g. fmpe-init 1.ubm 1.fmpe\n";
35 po.
Register(
"binary", &binary,
"If true, output fMPE object in binary mode.");
44 std::string dgmm_rxfilename = po.
GetArg(1),
45 fmpe_wxfilename = po.
GetArg(2);
51 Fmpe fmpe(dgmm, opts);
53 Output ko(fmpe_wxfilename, binary);
56 KALDI_LOG <<
"Initialized fMPE object and wrote to " 59 }
catch(
const std::exception &e) {
60 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 Register(OptionsItf *opts)
int main(int argc, char *argv[])
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables.
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility.
int NumArgs() const
Number of positional parameters (c.f. argc-1).
Definition for Gaussian Mixture Model with diagonal covariances.
void Write(std::ostream &os, bool binary) const