Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed -Wreordered warnings in feat #3090

Merged
merged 9 commits into from
Mar 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master'
  • Loading branch information
Piotr Żelasko committed Mar 6, 2019
commit cd90dd358de2aa51033519fa348b676772d500f9
10 changes: 5 additions & 5 deletions src/feat/feature-window.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ struct FrameExtractionOptions {
BaseFloat preemph_coeff; // Preemphasis coefficient.
bool remove_dc_offset; // Subtract mean of wave before FFT.
std::string window_type; // e.g. Hamming window
bool round_to_power_of_two;
BaseFloat blackman_coeff;
bool snip_edges;
bool allow_downsample;
int max_feature_vectors;
// May be "hamming", "rectangular", "povey", "hanning", "blackman"
// "povey" is a window I made to be similar to Hamming but to go to zero at the
// edges, it's pow((0.5 - 0.5*cos(n/N*2*pi)), 0.85)
Expand All @@ -54,6 +49,7 @@ struct FrameExtractionOptions {
bool snip_edges;
bool allow_downsample;
bool allow_upsample;
int max_feature_vectors;
FrameExtractionOptions():
samp_freq(16000),
frame_shift_ms(10.0),
Expand All @@ -67,6 +63,7 @@ struct FrameExtractionOptions {
snip_edges(true),
allow_downsample(false),
max_feature_vectors(-1) { }
allow_upsample(false) { }

void Register(OptionsItf *opts) {
opts->Register("sample-frequency", &samp_freq,
Expand Down Expand Up @@ -101,6 +98,9 @@ struct FrameExtractionOptions {
"Memory optimization. If larger than 0, periodically remove feature "
"vectors so that only this number of the latest feature vectors is "
"retained.");
opts->Register("allow-upsample", &allow_upsample,
"If true, allow the input waveform to have a lower frequency than "
"the specified --sample-frequency (and we'll upsample).");
}
int32 WindowShift() const {
return static_cast<int32>(samp_freq * 0.001 * frame_shift_ms);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.