Converts Hz to Bark
Details
$$ \hat{b} = \frac{26.81 hz}{1960 + hz} - 0.53 $$ $$ b = \begin{cases} \hat{b} + 0.15(2-\hat{b}) & \text{if}~\hat{b} < 2\\ \hat{b} + 0.22(\hat{b} - 20.1) & \text{if}~\hat{b} > 20.1\\ \hat{b} & \text{otherwise} \end{cases} $$
References
Traunmüller, H. (1990). Analytical expressions for the tonotopic sensory scale. The Journal of the Acoustical Society of America, 88(1), 97–100. https://doi.org/10.1121/1.399849