diff --git a/asteroid_filterbanks/multiphase_gammatone_fb.py b/asteroid_filterbanks/multiphase_gammatone_fb.py index 857011c..81812cf 100644 --- a/asteroid_filterbanks/multiphase_gammatone_fb.py +++ b/asteroid_filterbanks/multiphase_gammatone_fb.py @@ -1,3 +1,4 @@ +import math import numpy as np import torch from .enc_dec import Filterbank @@ -87,8 +88,8 @@ def gammatone_impulse_response(samplerate_hz, len_sec, center_freq_hz, phase_shi """ Generate single parametrized gammatone filter """ p = 2 # filter order erb = 24.7 + 0.108 * center_freq_hz # equivalent rectangular bandwidth - divisor = (np.pi * np.math.factorial(2 * p - 2) * np.power(2, float(-(2 * p - 2)))) / np.square( - np.math.factorial(p - 1) + divisor = (np.pi * math.factorial(2 * p - 2) * np.power(2, float(-(2 * p - 2)))) / np.square( + math.factorial(p - 1) ) b = erb / divisor # bandwidth parameter a = 1.0 # amplitude. This is varied later by the normalization process.