Commit f8b9515a authored by Daniel Povey's avatar Daniel Povey
Browse files

Merge pull request #44 from vdp/po-to-opts

Cosmetic variable name change: OptionsItf po -> OptionsItf opts
parents 5c01929a 28d28b07
......@@ -38,11 +38,11 @@ struct AlignConfig {
AlignConfig(): beam(200.0), retry_beam(0.0), careful(false) { }
void Register(OptionsItf *po) {
po->Register("beam", &beam, "Decoding beam used in alignment");
po->Register("retry-beam", &retry_beam,
void Register(OptionsItf *opts) {
opts->Register("beam", &beam, "Decoding beam used in alignment");
opts->Register("retry-beam", &retry_beam,
"Decoding beam for second try at alignment");
po->Register("careful", &careful,
opts->Register("careful", &careful,
"If true, do 'careful' alignment, which is better at detecting "
"alignment failure (involves loop to start of decoding graph).");
}
......
......@@ -42,17 +42,17 @@ struct FasterDecoderOptions {
// alignment, use small default.
beam_delta(0.5),
hash_ratio(2.0) { }
void Register(OptionsItf *po, bool full) { /// if "full", use obscure
void Register(OptionsItf *opts, bool full) { /// if "full", use obscure
/// options too.
/// Depends on program.
po->Register("beam", &beam, "Decoder beam");
po->Register("max-active", &max_active, "Decoder max active states.");
po->Register("min-active", &min_active,
opts->Register("beam", &beam, "Decoder beam");
opts->Register("max-active", &max_active, "Decoder max active states.");
opts->Register("min-active", &min_active,
"Decoder min active states (don't prune if #active less than this).");
if (full) {
po->Register("beam-delta", &beam_delta,
opts->Register("beam-delta", &beam_delta,
"Increment used in decoder [obscure setting]");
po->Register("hash-ratio", &hash_ratio,
opts->Register("hash-ratio", &hash_ratio,
"Setting used in decoder to control hash behavior");
}
}
......
......@@ -64,21 +64,21 @@ struct LatticeFasterDecoderConfig {
beam_delta(0.5),
hash_ratio(2.0),
prune_scale(0.1) { }
void Register(OptionsItf *po) {
det_opts.Register(po);
po->Register("beam", &beam, "Decoding beam.");
po->Register("max-active", &max_active, "Decoder max active states.");
po->Register("min-active", &min_active, "Decoder minimum #active states.");
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
void Register(OptionsItf *opts) {
det_opts.Register(opts);
opts->Register("beam", &beam, "Decoding beam.");
opts->Register("max-active", &max_active, "Decoder max active states.");
opts->Register("min-active", &min_active, "Decoder minimum #active states.");
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
"which to prune tokens");
po->Register("determinize-lattice", &determinize_lattice, "If true, "
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
"determinize the lattice (in a special sense, keeping only "
"best pdf-sequence for each word-sequence).");
po->Register("beam-delta", &beam_delta, "Increment used in decoding-- this "
opts->Register("beam-delta", &beam_delta, "Increment used in decoding-- this "
"parameter is obscure and relates to a speedup in the way the "
"max-active constraint is applied. Larger is more accurate.");
po->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
opts->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
" hash behavior");
}
void Check() const {
......
......@@ -53,13 +53,13 @@ struct LatticeSimpleDecoderConfig {
determinize_lattice(true),
beam_ratio(0.9),
prune_scale(0.1) { }
void Register(OptionsItf *po) {
det_opts.Register(po);
po->Register("beam", &beam, "Decoding beam.");
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
void Register(OptionsItf *opts) {
det_opts.Register(opts);
opts->Register("beam", &beam, "Decoding beam.");
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
"which to prune tokens");
po->Register("determinize-lattice", &determinize_lattice, "If true, "
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
"determinize the lattice (in a special sense, keeping only "
"best pdf-sequence for each word-sequence).");
}
......
......@@ -54,22 +54,22 @@ struct LatticeTrackingDecoderConfig {
hash_ratio(2.0),
extra_beam(4.0),
max_beam(40.0) { }
void Register(OptionsItf *po) {
det_opts.Register(po);
po->Register("beam", &beam, "Decoding beam.");
po->Register("max-active", &max_active, "Decoder max active states.");
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
void Register(OptionsItf *opts) {
det_opts.Register(opts);
opts->Register("beam", &beam, "Decoding beam.");
opts->Register("max-active", &max_active, "Decoder max active states.");
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
"which to prune tokens");
po->Register("determinize-lattice", &determinize_lattice, "If true, "
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
"determinize the lattice (in a special sense, keeping only "
"best pdf-sequence for each word-sequence).");
po->Register("beam-delta", &beam_delta, "Increment used in decoding");
po->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
opts->Register("beam-delta", &beam_delta, "Increment used in decoding");
opts->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
" hash behavior");
po->Register("extra-beam", &extra_beam, "Increment used in decoding (added "
opts->Register("extra-beam", &extra_beam, "Increment used in decoding (added "
"to worst tracked token from first pass)");
po->Register("max-beam", &max_beam, "Maximum beam (in case tracked tokens "
opts->Register("max-beam", &max_beam, "Maximum beam (in case tracked tokens "
"go too far from beam)");
}
......
......@@ -41,16 +41,16 @@ struct NBestDecoderOptions {
max_active(std::numeric_limits<int32>::max()),
n_best(1),
beam_delta(0.5), hash_ratio(2.0) { }
void Register(OptionsItf *po, bool full) { /// if "full", use obscure
void Register(OptionsItf *opts, bool full) { /// if "full", use obscure
/// options too.
/// Depends on program.
po->Register("beam", &beam, "Decoder beam");
po->Register("max-active", &max_active, "Decoder max active states.");
po->Register("n-best", &n_best, "Decoder number of best tokens.");
opts->Register("beam", &beam, "Decoder beam");
opts->Register("max-active", &max_active, "Decoder max active states.");
opts->Register("n-best", &n_best, "Decoder number of best tokens.");
if (full) {
po->Register("beam-delta", &beam_delta,
opts->Register("beam-delta", &beam_delta,
"Increment used in decoder [obscure setting]");
po->Register("hash-ratio", &hash_ratio,
opts->Register("hash-ratio", &hash_ratio,
"Setting used in decoder to control hash behavior");
}
}
......
......@@ -42,13 +42,13 @@ struct TrainingGraphCompilerOptions {
rm_eps(false),
reorder(b) { }
void Register(OptionsItf *po) {
po->Register("transition-scale", &transition_scale, "Scale of transition "
void Register(OptionsItf *opts) {
opts->Register("transition-scale", &transition_scale, "Scale of transition "
"probabilities (excluding self-loops)");
po->Register("self-loop-scale", &self_loop_scale, "Scale of self-loop vs. "
opts->Register("self-loop-scale", &self_loop_scale, "Scale of self-loop vs. "
"non-self-loop probability mass ");
po->Register("reorder", &reorder, "Reorder transition ids for greater decoding efficiency.");
po->Register("rm-eps", &rm_eps, "Remove [most] epsilons before minimization (only applicable "
opts->Register("reorder", &reorder, "Reorder transition ids for greater decoding efficiency.");
opts->Register("rm-eps", &rm_eps, "Remove [most] epsilons before minimization (only applicable "
"if disambig symbols present)");
}
};
......
......@@ -53,19 +53,19 @@ struct FbankOptions {
htk_compat(false),
use_log_fbank(true) {}
void Register(OptionsItf *po) {
frame_opts.Register(po);
mel_opts.Register(po);
po->Register("use-energy", &use_energy,
void Register(OptionsItf *opts) {
frame_opts.Register(opts);
mel_opts.Register(opts);
opts->Register("use-energy", &use_energy,
"Add an extra dimension with energy to the FBANK output.");
po->Register("energy-floor", &energy_floor,
opts->Register("energy-floor", &energy_floor,
"Floor on energy (absolute, not relative) in FBANK computation");
po->Register("raw-energy", &raw_energy,
opts->Register("raw-energy", &raw_energy,
"If true, compute energy before preemphasis and windowing");
po->Register("htk-compat", &htk_compat, "If true, put energy last. "
opts->Register("htk-compat", &htk_compat, "If true, put energy last. "
"Warning: not sufficient to get HTK compatible features (need "
"to change other parameters).");
po->Register("use-log-fbank", &use_log_fbank,
opts->Register("use-log-fbank", &use_log_fbank,
"If true, produce log-filterbank, else produce linear.");
}
};
......
......@@ -52,19 +52,19 @@ struct MelBanksOptions {
: num_bins(num_bins), low_freq(20), high_freq(0), vtln_low(100),
vtln_high(-500), debug_mel(false), htk_mode(false) {}
void Register(OptionsItf *po) {
po->Register("num-mel-bins", &num_bins,
void Register(OptionsItf *opts) {
opts->Register("num-mel-bins", &num_bins,
"Number of triangular mel-frequency bins");
po->Register("low-freq", &low_freq,
opts->Register("low-freq", &low_freq,
"Low cutoff frequency for mel bins");
po->Register("high-freq", &high_freq,
opts->Register("high-freq", &high_freq,
"High cutoff frequency for mel bins (if < 0, offset from Nyquist)");
po->Register("vtln-low", &vtln_low,
opts->Register("vtln-low", &vtln_low,
"Low inflection point in piecewise linear VTLN warping function");
po->Register("vtln-high", &vtln_high,
opts->Register("vtln-high", &vtln_high,
"High inflection point in piecewise linear VTLN warping function"
" (if negative, offset from high-mel-freq");
po->Register("debug-mel", &debug_mel,
opts->Register("debug-mel", &debug_mel,
"Print out debugging information for mel bin computation");
}
};
......@@ -95,22 +95,22 @@ struct FrameExtractionOptions {
round_to_power_of_two(true),
snip_edges(true){ }
void Register(OptionsItf *po) {
po->Register("sample-frequency", &samp_freq,
void Register(OptionsItf *opts) {
opts->Register("sample-frequency", &samp_freq,
"Waveform data sample frequency (must match the waveform file, "
"if specified there)");
po->Register("frame-length", &frame_length_ms, "Frame length in milliseconds");
po->Register("frame-shift", &frame_shift_ms, "Frame shift in milliseconds");
po->Register("preemphasis-coefficient", &preemph_coeff,
opts->Register("frame-length", &frame_length_ms, "Frame length in milliseconds");
opts->Register("frame-shift", &frame_shift_ms, "Frame shift in milliseconds");
opts->Register("preemphasis-coefficient", &preemph_coeff,
"Coefficient for use in signal preemphasis");
po->Register("remove-dc-offset", &remove_dc_offset,
opts->Register("remove-dc-offset", &remove_dc_offset,
"Subtract mean from waveform on each frame");
po->Register("dither", &dither, "Dithering constant (0.0 means no dither)");
po->Register("window-type", &window_type, "Type of window "
opts->Register("dither", &dither, "Dithering constant (0.0 means no dither)");
opts->Register("window-type", &window_type, "Type of window "
"(\"hamming\"|\"hanning\"|\"povey\"|\"rectangular\")");
po->Register("round-to-power-of-two", &round_to_power_of_two,
opts->Register("round-to-power-of-two", &round_to_power_of_two,
"If true, round window size to power of two.");
po->Register("snip-edges", &snip_edges,
opts->Register("snip-edges", &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 "
......@@ -197,9 +197,9 @@ struct DeltaFeaturesOptions {
DeltaFeaturesOptions(int32 order = 2, int32 window = 2):
order(order), window(window) { }
void Register(OptionsItf *po) {
po->Register("delta-order", &order, "Order of delta computation");
po->Register("delta-window", &window,
void Register(OptionsItf *opts) {
opts->Register("delta-order", &order, "Order of delta computation");
opts->Register("delta-window", &window,
"Parameter controlling window for delta computation (actual window"
" size for each delta order is 1 + 2*delta-window-size)");
}
......@@ -233,11 +233,11 @@ struct ShiftedDeltaFeaturesOptions {
ShiftedDeltaFeaturesOptions():
window(1), num_blocks(7), block_shift(3) { }
void Register(OptionsItf *po) {
po->Register("delta-window", &window, "Size of delta advance and delay.");
po->Register("num-blocks", &num_blocks, "Number of delta blocks in advance"
void Register(OptionsItf *opts) {
opts->Register("delta-window", &window, "Size of delta advance and delay.");
opts->Register("num-blocks", &num_blocks, "Number of delta blocks in advance"
" of each frame to be concatenated");
po->Register("block-shift", &block_shift, "Distance between each block");
opts->Register("block-shift", &block_shift, "Distance between each block");
}
};
......@@ -320,15 +320,15 @@ struct SlidingWindowCmnOptions {
normalize_variance(false),
center(false) { }
void Register(OptionsItf *po) {
po->Register("cmn-window", &cmn_window, "Window in frames for running "
void Register(OptionsItf *opts) {
opts->Register("cmn-window", &cmn_window, "Window in frames for running "
"average CMN computation");
po->Register("min-cmn-window", &min_window, "Minimum CMN window "
opts->Register("min-cmn-window", &min_window, "Minimum CMN window "
"used at start of decoding (adds latency only at start). "
"Only applicable if center == false, ignored if center==true");
po->Register("norm-vars", &normalize_variance, "If true, normalize "
opts->Register("norm-vars", &normalize_variance, "If true, normalize "
"variance to one."); // naming this as in apply-cmvn.cc
po->Register("center", &center, "If true, use a window centered on the "
opts->Register("center", &center, "If true, use a window centered on the "
"current frame (to the extent possible, modulo end effects). "
"If false, window is to the left.");
}
......
......@@ -57,20 +57,20 @@ struct MfccOptions {
cepstral_lifter(22.0),
htk_compat(false) {}
void Register(OptionsItf *po) {
frame_opts.Register(po);
mel_opts.Register(po);
po->Register("num-ceps", &num_ceps,
void Register(OptionsItf *opts) {
frame_opts.Register(opts);
mel_opts.Register(opts);
opts->Register("num-ceps", &num_ceps,
"Number of cepstra in MFCC computation (including C0)");
po->Register("use-energy", &use_energy,
opts->Register("use-energy", &use_energy,
"Use energy (not C0) in MFCC computation");
po->Register("energy-floor", &energy_floor,
opts->Register("energy-floor", &energy_floor,
"Floor on energy (absolute, not relative) in MFCC computation");
po->Register("raw-energy", &raw_energy,
opts->Register("raw-energy", &raw_energy,
"If true, compute energy before preemphasis and windowing");
po->Register("cepstral-lifter", &cepstral_lifter,
opts->Register("cepstral-lifter", &cepstral_lifter,
"Constant that controls scaling of MFCCs");
po->Register("htk-compat", &htk_compat,
opts->Register("htk-compat", &htk_compat,
"If true, put energy or C0 last and use a factor of sqrt(2) on "
"C0. Warning: not sufficient to get HTK compatible features "
"(need to change other parameters).");
......
......@@ -66,26 +66,26 @@ struct PlpOptions {
cepstral_scale(1.0),
htk_compat(false) {}
void Register(OptionsItf *po) {
frame_opts.Register(po);
mel_opts.Register(po);
po->Register("lpc-order", &lpc_order,
void Register(OptionsItf *opts) {
frame_opts.Register(opts);
mel_opts.Register(opts);
opts->Register("lpc-order", &lpc_order,
"Order of LPC analysis in PLP computation");
po->Register("num-ceps", &num_ceps,
opts->Register("num-ceps", &num_ceps,
"Number of cepstra in PLP computation (including C0)");
po->Register("use-energy", &use_energy,
opts->Register("use-energy", &use_energy,
"Use energy (not C0) for zeroth PLP feature");
po->Register("energy-floor", &energy_floor,
opts->Register("energy-floor", &energy_floor,
"Floor on energy (absolute, not relative) in PLP computation");
po->Register("raw-energy", &raw_energy,
opts->Register("raw-energy", &raw_energy,
"If true, compute energy before preemphasis and windowing");
po->Register("compress-factor", &compress_factor,
opts->Register("compress-factor", &compress_factor,
"Compression factor in PLP computation");
po->Register("cepstral-lifter", &cepstral_lifter,
opts->Register("cepstral-lifter", &cepstral_lifter,
"Constant that controls scaling of PLPs");
po->Register("cepstral-scale", &cepstral_scale,
opts->Register("cepstral-scale", &cepstral_scale,
"Scaling constant in PLP computation");
po->Register("htk-compat", &htk_compat,
opts->Register("htk-compat", &htk_compat,
"If true, put energy or C0 last and put factor of sqrt(2) on "
"C0. Warning: not sufficient to get HTK compatible features "
"(need to change other parameters).");
......
......@@ -44,11 +44,11 @@ struct SpectrogramOptions {
energy_floor(0.0), // not in log scale: a small value e.g. 1.0e-10
raw_energy(true) {}
void Register(OptionsItf *po) {
frame_opts.Register(po);
po->Register("energy-floor", &energy_floor,
void Register(OptionsItf *opts) {
frame_opts.Register(opts);
opts->Register("energy-floor", &energy_floor,
"Floor on energy (absolute, not relative) in Spectrogram computation");
po->Register("raw-energy", &raw_energy,
opts->Register("raw-energy", &raw_energy,
"If true, compute energy before preemphasis and windowing");
}
};
......
......@@ -132,64 +132,64 @@ struct PitchExtractionOptions {
nccf_ballast_online(false),
snip_edges(true) { }
void Register(OptionsItf *po) {
po->Register("sample-frequency", &samp_freq,
void Register(OptionsItf *opts) {
opts->Register("sample-frequency", &samp_freq,
"Waveform data sample frequency (must match the waveform "
"file, if specified there)");
po->Register("frame-length", &frame_length_ms, "Frame length in "
opts->Register("frame-length", &frame_length_ms, "Frame length in "
"milliseconds");
po->Register("frame-shift", &frame_shift_ms, "Frame shift in milliseconds");
po->Register("preemphasis-coefficient", &preemph_coeff,
opts->Register("frame-shift", &frame_shift_ms, "Frame shift in milliseconds");
opts->Register("preemphasis-coefficient", &preemph_coeff,
"Coefficient for use in signal preemphasis (deprecated)");
po->Register("min-f0", &min_f0,
opts->Register("min-f0", &min_f0,
"min. F0 to search for (Hz)");
po->Register("max-f0", &max_f0,
opts->Register("max-f0", &max_f0,
"max. F0 to search for (Hz)");
po->Register("soft-min-f0", &soft_min_f0,
opts->Register("soft-min-f0", &soft_min_f0,
"Minimum f0, applied in soft way, must not exceed min-f0");
po->Register("penalty-factor", &penalty_factor,
opts->Register("penalty-factor", &penalty_factor,
"cost factor for FO change.");
po->Register("lowpass-cutoff", &lowpass_cutoff,
opts->Register("lowpass-cutoff", &lowpass_cutoff,
"cutoff frequency for LowPass filter (Hz) ");
po->Register("resample-frequency", &resample_freq,
opts->Register("resample-frequency", &resample_freq,
"Frequency that we down-sample the signal to. Must be "
"more than twice lowpass-cutoff");
po->Register("delta-pitch", &delta_pitch,
opts->Register("delta-pitch", &delta_pitch,
"Smallest relative change in pitch that our algorithm "
"measures");
po->Register("nccf-ballast", &nccf_ballast,
opts->Register("nccf-ballast", &nccf_ballast,
"Increasing this factor reduces NCCF for quiet frames");
po->Register("nccf-ballast-online", &nccf_ballast_online,
opts->Register("nccf-ballast-online", &nccf_ballast_online,
"This is useful mainly for debug; it affects how the NCCF "
"ballast is computed.");
po->Register("lowpass-filter-width", &lowpass_filter_width,
opts->Register("lowpass-filter-width", &lowpass_filter_width,
"Integer that determines filter width of "
"lowpass filter, more gives sharper filter");
po->Register("upsample-filter-width", &upsample_filter_width,
opts->Register("upsample-filter-width", &upsample_filter_width,
"Integer that determines filter width when upsampling NCCF");
po->Register("frames-per-chunk", &frames_per_chunk, "Only relevant for "
opts->Register("frames-per-chunk", &frames_per_chunk, "Only relevant for "
"offline pitch extraction (e.g. compute-kaldi-pitch-feats), "
"you can set it to a small nonzero value, such as 10, for "
"better feature compatibility with online decoding (affects "
"energy normalization in the algorithm)");
po->Register("simulate-first-pass-online", &simulate_first_pass_online,
opts->Register("simulate-first-pass-online", &simulate_first_pass_online,
"If true, compute-kaldi-pitch-feats will output features "
"that correspond to what an online decoder would see in the "
"first pass of decoding-- not the final version of the "
"features, which is the default. Relevant if "
"--frames-per-chunk > 0");
po->Register("recompute-frame", &recompute_frame, "Only relevant for "
opts->Register("recompute-frame", &recompute_frame, "Only relevant for "
"online pitch extraction, or for compatibility with online "
"pitch extraction. A non-critical parameter; the frame at "
"which we recompute some of the forward pointers, after "
"revising our estimate of the signal energy. Relevant if"
"--frames-per-chunk > 0");
po->Register("max-frames-latency", &max_frames_latency, "Maximum number "
opts->Register("max-frames-latency", &max_frames_latency, "Maximum number "
"of frames of latency that we allow pitch tracking to "
"introduce into the feature processing (affects output only "
"if --frames-per-chunk > 0 and "
"--simulate-first-pass-online=true");
po->Register("snip-edges", &snip_edges, "If this is set to false, the "
opts->Register("snip-edges", &snip_edges, "If this is set to false, the "
"incomplete frames near the ending edge won't be snipped, so "
"that the number of frames is the file size divided by the "
"frame-shift. This makes different types of features give the "
......@@ -246,42 +246,42 @@ struct ProcessPitchOptions {
add_raw_log_pitch(false) { }
void Register(ParseOptions *po) {
po->Register("pitch-scale", &pitch_scale,
void Register(ParseOptions *opts) {
opts->Register("pitch-scale", &pitch_scale,
"Scaling factor for the final normalized log-pitch value");
po->Register("pov-scale", &pov_scale,
opts->Register("pov-scale", &pov_scale,
"Scaling factor for final POV (probability of voicing) "
"feature");
po->Register("pov-offset", &pov_offset,
opts->Register("pov-offset", &pov_offset,
"This can be used to add an offset to the POV feature. "
"Intended for use in online decoding as a substitute for "
" CMN.");
po->Register("delta-pitch-scale", &delta_pitch_scale,
opts->Register("delta-pitch-scale", &delta_pitch_scale,
"Term to scale the final delta log-pitch feature");
po->Register("delta-pitch-noise-stddev", &delta_pitch_noise_stddev,
opts->Register("delta-pitch-noise-stddev", &delta_pitch_noise_stddev,
"Standard deviation for noise we add to the delta log-pitch "
"(before scaling); should be about the same as delta-pitch "
"option to pitch creation. The purpose is to get rid of "
"peaks in the delta-pitch caused by discretization of pitch "
"values.");
po->Register("normalization-left-context", &normalization_left_context,
opts->Register("normalization-left-context", &normalization_left_context,
"Left-context (in frames) for moving window normalization");
po->Register("normalization-right-context", &normalization_right_context,
opts->Register("normalization-right-context", &normalization_right_context,
"Right-context (in frames) for moving window normalization");
po->Register("delta-window", &delta_window,
opts->Register("delta-window", &delta_window,
"Number of frames on each side of central frame, to use for "
"delta window.");
po->Register("delay", &delay,
opts->Register("delay", &delay,
"Number of frames by which the pitch information is delayed.");
po->Register("add-pov-feature", &add_pov_feature,
opts->Register("add-pov-feature", &add_pov_feature,
"If true, the warped NCCF is added to output features");
po->Register("add-normalized-log-pitch", &add_normalized_log_pitch,
opts->Register("add-normalized-log-pitch", &add_normalized_log_pitch,
"If true, the log-pitch with POV-weighted mean subtraction "
"over 1.5 second window is added to output features");
po->Register("add-delta-pitch", &add_delta_pitch,
opts->Register("add-delta-pitch", &add_delta_pitch,
"If true, time derivative of log-pitch is added to output "
"features");
po->Register("add-raw-log-pitch", &add_raw_log_pitch,
opts->Register("add-raw-log-pitch", &add_raw_log_pitch,
"If true, log(pitch) is added to output features");
}
};
......
......@@ -271,29 +271,29 @@ struct MultiSinusoidDetectorConfig {
max_freq(1800.0), subsample_freq(4000),
subsample_filter_cutoff(1900.0), subsample_filter_zeros(5) {}
void Register(OptionsItf *po) {
po->Register("frame-length", &frame_length_ms,
void Register(OptionsItf *opts) {
opts->Register("frame-length", &frame_length_ms,
"Frame length in milliseconds");
po->Register("frame-shift", &frame_shift_ms,
opts->Register("frame-shift", &frame_shift_ms,
"Frame shift in milliseconds");
po->Register("two-freq-min-energy", &two_freq_min_energy,
opts->Register("two-freq-min-energy", &two_freq_min_energy,
"For detecting two-frequency tones, minimum energy that "
"the quieter frequency must have (relative to total "
"enegy of frame)");
po->Register("two-freq-min-total-energy", &two_freq_min_total_energy,
opts->Register("two-freq-min-total-energy", &two_freq_min_total_energy,
"For detecting two-frequency tones, minimum energy that "
"the two frequencies together must have (relative to total "
"energy of frame)");
po->Register("one-freq-min-energy", &one_freq_min_energy, "For detecting "
opts->Register("one-freq-min-energy", &one_freq_min_energy, "For detecting "
"single-frequency tones, minimum energy that the frequency "
"must have relative to total energy of frame");
po->Register("min-freq", &min_freq, "Minimum frequency of sinusoid that "
opts->Register("min-freq", &min_freq, "Minimum frequency of sinusoid that "
"will be detected");
po->Register("max-freq", &max_freq, "Maximum frequency of sinusoid that "
opts->Register("max-freq", &max_freq, "Maximum frequency of sinusoid that "
"will be detected");
po->Register("subsample-freq", &subsample_freq, "Frequency at which "
opts->Register("subsample-freq", &subsample_freq, "Frequency at which "
"we subsample the signal");
po->Register("subsample-filter-cutoff", &subsample_filter_cutoff, "Filter "