In Bark.py there are two functions for converting between Hz and Bark units:
def hz2bark(self, f):
# HZ2BARK Converts frequencies Hertz (Hz) to Bark
#
z = 6 * np.arcsinh(f/600)
return z
def bark2hz(self, z):
# BARK2HZ Converts frequencies Bark to Hertz (HZ)
#
f = 650*np.sinh(z/7)
return f
These functions are not inverses of each other.
If we assume that hz2bark(f) is correct, then the correct inverse is f = 600*np.sinh(z/6), not f = 650*np.sinh(z/7).
The difference between the correct and incorrect version is shown below

In
Bark.pythere are two functions for converting between Hz and Bark units:These functions are not inverses of each other.
If we assume that
hz2bark(f)is correct, then the correct inverse isf = 600*np.sinh(z/6), notf = 650*np.sinh(z/7).The difference between the correct and incorrect version is shown below