Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 24 of file fmpe-init.cc.
References ParseOptions::GetArg(), KALDI_LOG, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), kaldi::ReadKaldiObject(), ParseOptions::Register(), FmpeOptions::Register(), Output::Stream(), and Fmpe::Write().
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.");
39 if (po.NumArgs() != 2) {
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);
54 fmpe.Write(ko.Stream(), 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 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)
Definition for Gaussian Mixture Model with diagonal covariances.