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-sum-accs.cc.
References ParseOptions::GetArg(), KALDI_LOG, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), FmpeStats::Read(), ParseOptions::Register(), Input::Stream(), and kaldi::WriteKaldiObject().
25 using namespace kaldi;
30 "Usage: fmpe-sum-accs [options...] <accs-out> <stats-in1> <stats-in2> ... \n" 31 "E.g. fmpe-sum-accs 1.accs 1.1.accs 1.2.accs 1.3.accs 1.4.accs\n";
35 po.Register(
"binary", &binary,
"If true, output fMPE stats in " 39 if (po.NumArgs() < 2) {
44 std::string stats_wxfilename = po.GetArg(1);
47 for (
int32 arg = 2; arg <= po.NumArgs(); arg++) {
48 std::string stats_rxfilename = po.GetArg(arg);
50 Input ki(stats_rxfilename, &binary);
51 stats.
Read(ki.Stream(), binary,
true);
56 KALDI_LOG <<
"Summed " << (po.NumArgs()-1) <<
" fMPE stats 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...
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)
void Read(std::istream &is, bool binary, bool add=false)