24 int main(
int argc,
char *argv[]) {
25 using namespace kaldi;
28 "Do one iteration of learning (modified gradient descent)\n" 30 "Usage: fmpe-est [options...] <fmpe-in> <stats-in> <fmpe-out>\n" 31 "E.g. fmpe-est 1.fmpe 1.accs 2.fmpe\n";
36 po.
Register(
"binary", &binary,
"If true, output fMPE object in " 46 std::string fmpe_rxfilename = po.
GetArg(1),
47 stats_rxfilename = po.
GetArg(2),
48 fmpe_wxfilename = po.
GetArg(3);
60 KALDI_LOG <<
"Updated fMPE object and wrote to " 63 }
catch(
const std::exception &e) {
64 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
BaseFloat Update(const FmpeUpdateOptions &config, const FmpeStats &stats)
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
void Register(OptionsItf *opts)
void Register(const std::string &name, bool *ptr, const std::string &doc)
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
int main(int argc, char *argv[])
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
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).
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)