Skip to content

Commit

Permalink
[src] Fix bug in previous bugfix PR kaldi-asr#3639 in resampling chec…
Browse files Browse the repository at this point in the history
…ks for online features (kaldi-asr#3792)
  • Loading branch information
entn-at authored and luitjens committed Jan 28, 2020
1 parent 5d27ad3 commit d0e17cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/feat/online-feature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ void OnlineGenericBaseFeature<C>::MaybeCreateResampler(
if (resampler_ != nullptr) {
KALDI_ASSERT(resampler_->GetInputSamplingRate() == sampling_rate);
KALDI_ASSERT(resampler_->GetOutputSamplingRate() == expected_sampling_rate);
} else if (((sampling_rate < expected_sampling_rate) &&
} else if (((sampling_rate > expected_sampling_rate) &&
computer_.GetFrameOptions().allow_downsample) ||
((sampling_rate > expected_sampling_rate) &&
((sampling_rate < expected_sampling_rate) &&
computer_.GetFrameOptions().allow_upsample)) {
resampler_.reset(new LinearResample(
sampling_rate, expected_sampling_rate,
Expand Down

0 comments on commit d0e17cd

Please sign in to comment.