25 int main(
int argc, 
char *argv[]) {
    27     using namespace kaldi;
    30         "Splice features with left and right context (e.g. prior to LDA)\n"    31         "Usage: splice-feats [options] <feature-rspecifier> <feature-wspecifier>\n"    32         "e.g.: splice-feats scp:feats.scp ark:-\n";
    36     int32 left_context = 4, right_context = 4;
    39     po.
Register(
"left-context", &left_context, 
"Number of frames of left context");
    40     po.
Register(
"right-context", &right_context, 
"Number of frames of right context");
    49     std::string rspecifier = po.
GetArg(1);
    50     std::string wspecifier = po.
GetArg(2);
    54     for (; !kaldi_reader.
Done(); kaldi_reader.
Next()) {
    60       kaldi_writer.
Write(kaldi_reader.
Key(), spliced);
    63   } 
catch(
const std::exception &e) {
    64     std::cerr << e.what();
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor]. 
 
A templated class for writing objects to an archive or script file; see The Table concept...
 
void Write(const std::string &key, const T &value) const
 
void Register(const std::string &name, bool *ptr, const std::string &doc)
 
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. 
 
int NumArgs() const
Number of positional parameters (c.f. argc-1). 
 
int main(int argc, char *argv[])
 
void SpliceFrames(const MatrixBase< BaseFloat > &input_features, int32 left_context, int32 right_context, Matrix< BaseFloat > *output_features)