24 int main(
int argc,
char *argv[]) {
25 using namespace kaldi;
29 "Sum matrices, e.g. stats for fMPE training\n" 30 "Usage: sum-matrices [options] <mat-out> <mat-in1> <mat-in2> ...\n" 32 " sum-matrices mat 1.mat 2.mat 3.mat\n";
37 po.
Register(
"binary", &binary,
"Write output in binary mode");
50 mat.
Read(ki.Stream(), binary_in,
true);
55 mat.
Write(ko.Stream(), binary);
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...
void Write(std::ostream &out, bool binary) const
write to stream.
int main(int argc, char *argv[])
MatrixIndexT NumCols() const
Returns number of columns (or zero for empty matrix).
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 Read(std::istream &in, bool binary, bool add=false)
read from stream.
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).
MatrixIndexT NumRows() const
Returns number of rows (or zero for empty matrix).