nnAudio.librosa_functions¶
Module containing functions cloned from librosa
To make sure nnAudio would not become broken when updating librosa
Functions
Create a chroma filter bank. |
|
# Ellis’ description in MATLAB: # [wts,cfreqa] = fft2gammatonemx(nfft, sr, nfilts, width, minfreq, maxfreq, maxlen) # Generate a matrix of weights to combine FFT bins into # Gammatone bins. |
|
Alternative implementation of np.fft.fftfreq :param sr: Audio sampling rate :type sr: number > 0 [scalar] :param n_fft: FFT window size :type n_fft: int > 0 [scalar] |
|
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 :type fmax: float >= 0 [scalar] :param htk: use HTK formula instead of Slaney :type htk: bool [scalar] :param norm: 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 :type norm: {None, 1, np.inf} [scalar] :param dtype: The data type of the output basis. By default, uses 32-bit (single-precision) floating point. :type dtype: np.dtype. |
|
This function is cloned from librosa 0.7. |
|
Convert Hz to Mels . |
|
Convert frequencies (Hz) to (fractional) octave numbers. |
|
This function is cloned from librosa 0.7. |
|
Convert mel bin numbers to frequencies . |
|
Normalize an array along a chosen axis. |
|
Wrapper for np.pad to automatically center an array prior to padding. |
|
Compute the tiny-value corresponding to an input’s data type. |