186 using namespace kaldi;
189 "Add vectors (e.g. weights, transition-accs; speaker vectors)\n" 190 "If you need to scale the inputs, use vector-scale on the inputs\n" 193 " vector-sum [options] <vector-in-rspecifier1> [<vector-in-rspecifier2>" 194 " <vector-in-rspecifier3> ...] <vector-out-wspecifier>\n" 195 " e.g.: vector-sum ark:1.weights ark:2.weights ark:combine.weights\n" 196 "Type two usage (sums a single table input to produce a single output):\n" 197 " vector-sum [options] <vector-in-rspecifier> <vector-out-wxfilename>\n" 198 " e.g.: vector-sum --binary=false vecs.ark sum.vec\n" 199 "Type three usage (sums single-file inputs to produce a single output):\n" 200 " vector-sum [options] <vector-in-rxfilename1> <vector-in-rxfilename2> ..." 201 " <vector-out-wxfilename>\n" 202 " e.g.: vector-sum --binary=false 1.vec 2.vec 3.vec sum.vec\n" 203 "See also: copy-vector, dot-weights\n";
205 bool binary, average =
false;
209 po.Register(
"binary", &binary,
"If true, write output as binary (only " 210 "relevant for usage types two or three");
211 po.Register(
"average", &average,
"Do average instead of sum");
215 int32 N = po.NumArgs(), exit_status;
217 if (po.NumArgs() >= 2 &&
221 }
else if (po.NumArgs() == 2 &&
227 }
else if (po.NumArgs() >= 2 &&
238 }
catch(
const std::exception &e) {
239 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 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)
int32 TypeThreeUsage(const ParseOptions &po, bool binary, bool average)