nnAudio.librosa_functions.mel_frequencies

nnAudio.librosa_functions.mel_frequencies(n_mels=128, fmin=0.0, fmax=11025.0, htk=False)

This function is cloned from librosa 0.7. Please refer to the original documentation for more info.

Parameters
  • n_mels (int > 0 [scalar]) – Number of mel bins.

  • fmin (float >= 0 [scalar]) – Minimum frequency (Hz).

  • fmax (float >= 0 [scalar]) – Maximum frequency (Hz).

  • htk (bool) – If True, use HTK formula to convert Hz to mel. Otherwise (False), use Slaney’s Auditory Toolbox.

Returns

bin_frequencies – Vector of n_mels frequencies in Hz which are uniformly spaced on the Mel axis.

Return type

ndarray [shape=(n_mels,)]

Examples

>>> librosa.mel_frequencies(n_mels=40)
array([     0.   ,     85.317,    170.635,    255.952,
          341.269,    426.586,    511.904,    597.221,
          682.538,    767.855,    853.173,    938.49 ,
         1024.856,   1119.114,   1222.042,   1334.436,
         1457.167,   1591.187,   1737.532,   1897.337,
         2071.84 ,   2262.393,   2470.47 ,   2697.686,
         2945.799,   3216.731,   3512.582,   3835.643,
         4188.417,   4573.636,   4994.285,   5453.621,
         5955.205,   6502.92 ,   7101.009,   7754.107,
         8467.272,   9246.028,  10096.408,  11025.   ])