nnAudio.librosa_functions.get_gammatone

nnAudio.librosa_functions.get_gammatone(sr, n_fft, n_bins=64, fmin=20.0, fmax=None, htk=False, norm=1, dtype=<class 'numpy.float32'>)

Create a Filterbank matrix to combine FFT bins into Gammatone bins :param sr: sampling rate of the incoming signal :type sr: number > 0 [scalar] :param n_fft: number of FFT components :type n_fft: int > 0 [scalar] :param n_bins: number of Mel bands to generate :type n_bins: int > 0 [scalar] :param fmin: lowest frequency (in Hz) :type fmin: float >= 0 [scalar] :param fmax: highest frequency (in Hz).

If None, use fmax = sr / 2.0

Parameters
  • htk (bool [scalar]) – use HTK formula instead of Slaney

  • norm ({None, 1, np.inf} [scalar]) – if 1, divide the triangular mel weights by the width of the mel band (area normalization). Otherwise, leave all the triangles aiming for a peak value of 1.0

  • dtype (np.dtype) – The data type of the output basis. By default, uses 32-bit (single-precision) floating point.

Returns

G – Gammatone transform matrix

Return type

np.ndarray [shape=(n_bins, 1 + n_fft/2)]