@@ -463,8 +463,6 @@ def create_fb_matrix(
463463 # freq bins
464464 # Equivalent filterbank construction by Librosa
465465 all_freqs = torch .linspace (0 , sample_rate // 2 , n_freqs )
466- i_freqs = all_freqs .ge (f_min ) & all_freqs .le (f_max )
467- freqs = all_freqs [i_freqs ]
468466
469467 # calculate mel freq bins
470468 # hertz to mel(f) is 2595. * math.log10(1. + (f / 700.))
@@ -710,9 +708,6 @@ def lfilter(
710708 Returns:
711709 Tensor: Waveform with dimension of `(..., time)`. Output will be clipped to -1 to 1.
712710 """
713-
714- dim = waveform .dim ()
715-
716711 # pack batch
717712 shape = waveform .size ()
718713 waveform = waveform .view (- 1 , shape [- 1 ])
@@ -820,12 +815,8 @@ def highpass_biquad(
820815 Returns:
821816 Tensor: Waveform dimension of `(..., time)`
822817 """
823-
824- GAIN = 1.
825818 w0 = 2 * math .pi * cutoff_freq / sample_rate
826- A = math .exp (GAIN / 40.0 * math .log (10 ))
827819 alpha = math .sin (w0 ) / 2. / Q
828- mult = _dB2Linear (max (GAIN , 0 ))
829820
830821 b0 = (1 + math .cos (w0 )) / 2
831822 b1 = - 1 - math .cos (w0 )
@@ -853,12 +844,8 @@ def lowpass_biquad(
853844 Returns:
854845 Tensor: Waveform of dimension of `(..., time)`
855846 """
856-
857- GAIN = 1.
858847 w0 = 2 * math .pi * cutoff_freq / sample_rate
859- A = math .exp (GAIN / 40.0 * math .log (10 ))
860848 alpha = math .sin (w0 ) / 2 / Q
861- mult = _dB2Linear (max (GAIN , 0 ))
862849
863850 b0 = (1 - math .cos (w0 )) / 2
864851 b1 = 1 - math .cos (w0 )
@@ -1030,7 +1017,6 @@ def band_biquad(
10301017 https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF
10311018 """
10321019 w0 = 2 * math .pi * central_freq / sample_rate
1033- alpha = math .sin (w0 ) / 2 / Q
10341020 bw_Hz = central_freq / Q
10351021
10361022 a0 = 1.
0 commit comments