Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.9.1.

librosa.hz_to_mel

librosa.hz_to_mel(frequencies, htk=False)[source]

Convert Hz to Mels

Parameters
frequenciesnumber or np.ndarray [shape=(n,)] , float

scalar or array of frequencies

htkbool

use HTK formula instead of Slaney

Returns
melsnumber or np.ndarray [shape=(n,)]

input frequencies in Mels

See also

mel_to_hz

Examples

>>> librosa.hz_to_mel(60)
0.9
>>> librosa.hz_to_mel([110, 220, 440])
array([ 1.65,  3.3 ,  6.6 ])