30 using namespace kaldi;
32 "Post-process Kaldi pitch features, consisting of pitch and NCCF, into\n" 33 "features suitable for input to ASR system. Default setup produces\n" 34 "3-dimensional features consisting of (pov-feature, pitch-feature,\n" 35 "delta-pitch-feature), where pov-feature is warped NCCF, pitch-feature\n" 36 "is log-pitch with POV-weighted mean subtraction over 1.5 second window,\n" 37 "and delta-pitch-feature is delta feature computed on raw log pitch.\n" 38 "In general, you can select from four features: (pov-feature, \n" 39 "pitch-feature, delta-pitch-feature, raw-log-pitch), produced in that \n" 40 "order, by setting the boolean options (--add-pov-feature, \n" 41 "--add-normalized-log-pitch, --add-delta-pitch and --add-raw-log-pitch)\n" 43 "Usage: process-kaldi-pitch-feats [options...] <feat-rspecifier> <feats-wspecifier>\n" 45 "e.g.: compute-kaldi-pitch-feats [args] ark:- | process-kaldi-pitch-feats ark:- ark:feats.ark\n" 47 "See also: compute-kaldi-pitch-feats, compute-and-process-kaldi-pitch-feats\n";
56 po.Register(
"srand", &srand_seed,
"Seed for random number generator, used to " 57 "add noise to delta-log-pitch features");
61 if (po.NumArgs() != 2) {
68 std::string feat_rspecifier = po.GetArg(1),
69 feat_wspecifier = po.GetArg(2);
75 for (; !feat_reader.Done(); feat_reader.Next()) {
76 std::string utt = feat_reader.Key();
82 feat_writer.Write(utt, processed_feats);
85 KALDI_LOG <<
"Post-processed pitch for " << num_done <<
" utterances.";
86 return (num_done != 0 ? 0 : 1);
87 }
catch(
const std::exception &e) {
88 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 ProcessPitch(const ProcessPitchOptions &opts, const MatrixBase< BaseFloat > &input, Matrix< BaseFloat > *output)
This function processes the raw (NCCF, pitch) quantities computed by ComputeKaldiPitch, and processes them into features.
void Register(ParseOptions *opts)