Skip to content

Commit

Permalink
Add command line feature options (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
megazone87 authored Mar 1, 2024
1 parent dd8c367 commit 8e82146
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sherpa/cpp_api/feature-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,22 @@ static void RegisterFrameExtractionOptions(
"Dithering constant (0.0 means no dither). "
"Caution: Samples are normalized to the range [-1, 1). "
"Please select a small value for dither if you want to enable it");

po->Register(
"snip-edges", &opts->snip_edges,
"If true, end effects will be handled by outputting only frames that "
"completely fit in the file, and the number of frames depends on the "
"frame-length. If false, the number of frames depends only on the "
"frame-shift, and we reflect the data at the ends.");
}

static void RegisterMelBanksOptions(ParseOptions *po,
kaldifeat::MelBanksOptions *opts) {
po->Register("num-mel-bins", &opts->num_bins,
"Number of triangular mel-frequency bins");
po->Register(
"high-freq", &opts->high_freq,
"High cutoff frequency for mel bins (if <= 0, offset from Nyquist)");
}

void FeatureConfig::Register(ParseOptions *po) {
Expand Down

0 comments on commit 8e82146

Please sign in to comment.