24 int main(
int argc,
char *argv[]) {
29 "Sum multiple accumulated stats files for full-covariance GMM " 31 "Usage: fgmm-global-sum-accs [options] stats-out stats-in1 stats-in2 ...\n";
35 po.
Register(
"binary", &binary,
"Write output in binary mode");
43 std::string stats_out_filename = po.
GetArg(1);
46 for (
int i = 2, max = po.
NumArgs();
i <= max;
i++) {
47 std::string stats_in_filename = po.
GetArg(
i);
50 gmm_accs.
Read(ki.
Stream(), binary_read,
true );
59 KALDI_LOG <<
"Written stats to " << stats_out_filename;
60 }
catch(
const std::exception &e) {
61 std::cerr << e.what() <<
'\n';
void Write(std::ostream &out_stream, bool binary) const
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)
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
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.
Class for computing the maximum-likelihood estimates of the parameters of a Gaussian mixture model...
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility.
void Read(std::istream &in_stream, bool binary, bool add)
int NumArgs() const
Number of positional parameters (c.f. argc-1).