Skip to content

Commit

Permalink
fixed numtaps to be odd
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Buethe committed Sep 13, 2024
1 parent 138cd42 commit 45e92da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnn/torch/osce/bwe_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def random_resamp16(x, fs=48000):
assert fs == 48000 and "only supporting 48kHz input sampling rate for now"

cutoff = 800 * np.random.rand(1) + 7200 # cutoff between 7.2 and 8 kHz
numtaps = np.random.randint(151, 301)
numtaps = 2 * np.random.randint(75, 150) + 1
a = signal.firwin(numtaps, cutoff, fs=fs)

x16 = np.convolve(x, a, mode='same')[::3]
Expand Down

0 comments on commit 45e92da

Please sign in to comment.