27 int main(
int argc,
char *argv[]) {
29 using namespace kaldi;
32 typedef kaldi::int64 int64;
35 "This copies nnet3 discriminative training examples from input to output, merging them\n" 36 "into composite examples. The --minibatch-size option controls how many egs\n" 37 "are merged into a single output eg.\n" 39 "Usage: nnet3-discriminative-egs [options] <egs-rspecifier> <egs-wspecifier>\n" 41 "nnet3-discriminative-merge-egs --minibatch-size=128 ark:1.degs ark:- | nnet3-discriminative-train ... \n" 42 "See also nnet3-discriminative-copy-egs\n";
56 std::string examples_rspecifier = po.
GetArg(1),
57 examples_wspecifier = po.
GetArg(2);
64 for (; !example_reader.
Done(); example_reader.
Next()) {
71 }
catch(
const std::exception &e) {
72 std::cerr << e.what() <<
'\n';
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void AcceptExample(NnetDiscriminativeExample *a)
This class is responsible for arranging examples in groups that have the same strucure (i...
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
int main(int argc, char *argv[])
A templated class for writing objects to an archive or script file; see The Table concept...
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...
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.
void Register(OptionsItf *po)
int NumArgs() const
Number of positional parameters (c.f. argc-1).
NnetDiscriminativeExample is like NnetExample, but specialized for sequence training.