266     using namespace kaldi;
   270         "Add matrices (supports various forms)\n"   273         " matrix-sum [options] <matrix-in-rspecifier1> [<matrix-in-rspecifier2>"   274         " <matrix-in-rspecifier3> ...] <matrix-out-wspecifier>\n"   275         "  e.g.: matrix-sum ark:1.weights ark:2.weights ark:combine.weights\n"   276         "  This usage supports the --scale1 and --scale2 options to scale the\n"   277         "  first two input tables.\n"   278         "Type two usage (sums a single table input to produce a single output):\n"   279         " matrix-sum [options] <matrix-in-rspecifier> <matrix-out-wxfilename>\n"   280         " e.g.: matrix-sum --binary=false mats.ark sum.mat\n"   281         "Type three usage (sums or averages single-file inputs to produce\n"   282         "a single output):\n"   283         " matrix-sum [options] <matrix-in-rxfilename1> <matrix-in-rxfilename2> ..."   284         " <matrix-out-wxfilename>\n"   285         " e.g.: matrix-sum --binary=false 1.mat 2.mat 3.mat sum.mat\n"   286         "See also: matrix-sum-rows, copy-matrix\n";
   290     bool average = 
false;
   295     po.Register(
"scale1", &scale1, 
"Scale applied to first matrix "   296                 "(only for type one usage)");
   297     po.Register(
"scale2", &scale2, 
"Scale applied to second matrix "   298                 "(only for type one usage)");
   299     po.Register(
"binary", &binary, 
"If true, write output as binary (only "   300                 "relevant for usage types two or three");
   301     po.Register(
"average", &average, 
"If true, compute average instead of "   302                 "sum; currently compatible with type 3 or type 1 usage.");
   306     int32 N = po.NumArgs(), exit_status;
   308     if (po.NumArgs() >= 2 &&
   316     } 
else if (po.NumArgs() == 2 &&
   322         KALDI_ERR << 
"--average option not compatible with type two usage.";
   325     } 
else if (po.NumArgs() >= 2 &&
   336   } 
catch(
const std::exception &e) {
   337     std::cerr << e.what();
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
RspecifierType ClassifyRspecifier(const std::string &rspecifier, std::string *rxfilename, RspecifierOptions *opts)
 
int32 TypeTwoUsage(const ParseOptions &po, bool binary)
 
int32 TypeOneUsageAverage(const ParseOptions &po)
 
int32 TypeOneUsage(const ParseOptions &po, BaseFloat scale1, BaseFloat scale2)
 
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
 
WspecifierType ClassifyWspecifier(const std::string &wspecifier, std::string *archive_wxfilename, std::string *script_wxfilename, WspecifierOptions *opts)
 
#define KALDI_ASSERT(cond)
 
int32 TypeThreeUsage(const ParseOptions &po, bool binary, bool average)