def hz2bark(self, f):
""" Method to compute Bark from Hz.
Args :
f : (ndarray) Array containing frequencies in Hz.
Returns :
Brk : (ndarray) Array containing Bark scaled values.
"""
Brk = 6. * np.arcsinh(f/600.) # Method from RASTA model and computable inverse function.
#Brk = 13. * np.arctan(0.76*f/1000.) + 3.5 * np.arctan(f / (1000 * 7.5)) ** 2.
return Brk
评论列表
文章目录