24 int main(
int argc,
char *argv[]) {
27 using namespace kaldi;
30 "Do model re-estimation of iVector extractor (this is\n" 31 "the update phase of a single pass of E-M)\n" 32 "Usage: ivector-extractor-est [options] <model-in> <stats-in> <model-out>\n";
38 po.
Register(
"binary", &binary,
"Write output in binary mode");
40 "Number of threads used in update");
51 std::string model_rxfilename = po.
GetArg(1),
52 stats_rxfilename = po.
GetArg(2),
53 model_wxfilename = po.
GetArg(3);
63 stats.
Update(update_opts, &extractor);
67 KALDI_LOG <<
"Updated model and wrote it to " 71 }
catch(
const std::exception &e) {
72 std::cerr << e.what() <<
'\n';
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...
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)