28     using namespace kaldi;
    32         "Apply sliding-window cepstral mean (and optionally variance)\n"    33         "normalization per utterance.  If center == true, window is centered\n"    34         "on frame being normalized; otherwise it precedes it in time.\n"    35         "Useful for speaker-id; see also apply-cmvn-online\n"    37         "Usage: apply-cmvn-sliding [options] <feats-rspecifier> <feats-wspecifier>\n";
    45     if (po.NumArgs() != 2) {
    50     int32 num_done = 0, num_err = 0;
    52     std::string feat_rspecifier = po.GetArg(1);
    53     std::string feat_wspecifier = po.GetArg(2);
    58     for (;!feat_reader.Done(); feat_reader.Next()) {
    59       std::string utt = feat_reader.Key();
    61       if (feat.NumRows() == 0) {
    62         KALDI_WARN << 
"Empty feature matrix for utterance " << utt;
    71       feat_writer.Write(utt, cmvn_feat);
    75     KALDI_LOG << 
"Applied sliding-window cepstral mean "    77               << 
"normalization to " << num_done << 
" utterances, "    78               << num_err << 
" had errors.";
    79     return (num_done != 0 ? 0 : 1);
    80   } 
catch(
const std::exception &e) {
    81     std::cerr << e.what();
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
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...
 
void Register(OptionsItf *opts)
 
void SlidingWindowCmn(const SlidingWindowCmnOptions &opts, const MatrixBase< BaseFloat > &input, MatrixBase< BaseFloat > *output)
Applies sliding-window cepstral mean and/or variance normalization.