26 using namespace kaldi;
30 "Get feature-projection transform using stats obtained with acc-lda.\n" 31 "The file <index-list> contains a series of line, each containing a list\n" 32 "of integer indexes. For each line we create a transform of the same type\n" 33 "as nnet-get-feature-transform would produce, taking as input just the\n" 34 "listed feature dimensions. The output transform will be the concatenation\n" 35 "of all these transforms. The output-dim will be the number of integers in\n" 36 "the file <index-list> (the individual transforms are not dimension-reducing).\n" 37 "Do not set the --dim option." 38 "Usage: nnet-get-feature-transform-multi [options] <index-list> <lda-acc-1> <lda-acc-2> ... <lda-acc-n> <matrix-out>\n";
44 po.Register(
"binary", &binary,
"Write accumulators in binary mode.");
48 if (po.NumArgs() < 2) {
54 std::string index_list_rxfilename = po.GetArg(1);
55 std::string projection_wxfilename = po.GetArg(po.NumArgs());
57 std::vector<std::vector<int32> > indexes;
59 Input ki(index_list_rxfilename);
61 while (getline(ki.Stream(), line)) {
62 std::vector<int32> this_indexes;
64 true, &this_indexes) ||
66 KALDI_ERR <<
"Bad line in index-list file: line is " << line;
68 indexes.push_back(this_indexes);
75 for (int32
i = 2;
i < po.NumArgs();
i++) {
76 bool binary_in, add =
true;
77 Input ki(po.GetArg(
i), &binary_in);
78 fte.
Read(ki.Stream(), binary_in, add);
88 }
catch(
const std::exception &e) {
89 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
bool SplitStringToIntegers(const std::string &full, const char *delim, bool omit_empty_strings, std::vector< I > *out)
Split a string (e.g.
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void Read(std::istream &in_stream, bool binary, bool add)
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)
std::string PrintableRxfilename(const std::string &rxfilename)
PrintableRxfilename turns the rxfilename into a more human-readable form for error reporting...
std::string PrintableWxfilename(const std::string &wxfilename)
PrintableWxfilename turns the wxfilename into a more human-readable form for error reporting...