27 using namespace kaldi;
30 "Print dimension info on an input matrix (rows then cols, separated by tab), to\n" 31 "standard output. Output for single filename: rows[tab]cols. Output per line for\n" 32 "archive of files: key[tab]rows[tab]cols\n" 33 "Usage: matrix-dim [options] <matrix-in>|<in-rspecifier>\n" 34 "e.g.: matrix-dim final.mat | cut -f 2\n" 35 "See also: feat-to-len, feat-to-dim\n";
41 if (po.NumArgs() != 1) {
47 std::string matrix_rspecifier = po.GetArg(1);
50 for (; !matrix_reader.Done(); matrix_reader.Next(), num_read++) {
52 std::cout << matrix_reader.Key() <<
'\t' 56 KALDI_WARN <<
"No features read from rspecifier '" 57 << matrix_rspecifier <<
"'";
58 return (num_read == 0 ? 1 : 0);
60 std::string matrix_rxfilename = po.GetArg(1);
66 }
catch(
const std::exception &e) {
67 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
MatrixIndexT NumCols() const
Returns number of columns (or zero for empty matrix).
RspecifierType ClassifyRspecifier(const std::string &rspecifier, std::string *rxfilename, RspecifierOptions *opts)
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...
A templated class for reading objects sequentially from an archive or script file; see The Table conc...
MatrixIndexT NumRows() const
Returns number of rows (or zero for empty matrix).