code: def _hz_to_bark(
      freqs: float, bark_scale: str = "traunmuller"
  ) -> float:
      r"""Convert Hz to Barks.
  
      Args:
          freqs (float): Frequencies in Hz
          bark_scale (str, optional): Scale to use: ``traunmuller``, ``schroeder`` or ``wang``. (Default: ``traunmuller``)
  
      Returns:
          barks (float): Frequency in Barks
      """
  
      if bark_scale not in ["schroeder", "traunmuller", "wang"]:
          raise ValueError(
              'bark_scale should be one of "schroeder", "traunmuller" or "wang".'
          )
  
      if bark_scale == "wang":
          return 6.0 * math.asinh(freqs / 600.0)
      elif bark_scale == "schroeder":
          return 7.0 * math.asinh(freqs / 650.0)
      # Traunmuller Bark scale
      barks = ((26.81 * freqs) / (1960.0 + freqs)) - 0.53
      # Bark value correction
      if barks < 2:
          barks += 0.15 * (2 - barks)
      elif barks > 20.1:
          barks += 0.22 * (barks - 20.1)
  
      return barks
  
file_path: audio/src/torchaudio/prototype/functional/functional.py
imports: import math
  import warnings
  from typing import Optional
  import torch
  from torchaudio.functional.functional import _create_triangular_filterbank
label_desc: Use image node_id 1 for calling a global function with example usage: _hz_to_bark(freqs, bark_scale) and returns: barks, unknown, unknown