class_docstr: Create BarkSpectrogram for a raw audio signal.
  
  .. devices:: CPU CUDA
  
  .. properties:: Autograd TorchScript
  
  This is a composition of :py:func:`torchaudio.transforms.Spectrogram` and
  and :py:func:`torchaudio.transforms.BarkScale`.
  
  Sources
      * https://www.fon.hum.uva.nl/praat/manual/BarkSpectrogram.html
      * Traunmüller, Hartmut. "Analytical Expressions for the Tonotopic Sensory Scale." Journal of the Acoustical
      * Society of America. Vol. 88, Issue 1, 1990, pp. 97–100.
      * https://ccrma.stanford.edu/courses/120-fall-2003/lecture-5.html
  
  Args:
      sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``)
      n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``)
      win_length (int or None, optional): Window size. (Default: ``n_fft``)
      hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``)
      f_min (float, optional): Minimum frequency. (Default: ``0.``)
      f_max (float or None, optional): Maximum frequency. (Default: ``None``)
      pad (int, optional): Two sided padding of signal. (Default: ``0``)
      n_mels (int, optional): Number of mel filterbanks. (Default: ``128``)
      window_fn (Callable[..., torch.Tensor], optional): A function to create a window tensor
          that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``)
      power (float, optional): Exponent for the magnitude spectrogram,
          (must be > 0) e.g., 1 for energy, 2 for power, etc. (Default: ``2``)
      normalized (bool, optional): Whether to normalize by magnitude after stft. (Default: ``False``)
      wkwargs (Dict[..., ...] or None, optional): Arguments for window function. (Default: ``None``)
      center (bool, optional): whether to pad :attr:`waveform` on both sides so
          that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`.
          (Default: ``True``)
      pad_mode (string, optional): controls the padding method used when
          :attr:`center` is ``True``. (Default: ``"reflect"``)
      bark_scale (str, optional): Scale to use: ``traunmuller``, ``schroeder`` or ``wang``. (Default: ``traunmuller``)
  
  Example
      >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True)
      >>> transform = transforms.BarkSpectrogram(sample_rate)
      >>> bark_specgram = transform(waveform)  # (channel, n_barks, time)
  
  See also:
      :py:func:`torchaudio.functional.melscale_fbanks` - The function used to
      generate the filter banks.
class_docstr_tok: ["Create","BarkSpectrogram","for","a","raw","audio","signal",".","..","devices",":",":","CPU","CUDA","..","properties",":",":","Autograd","TorchScript","This","is","a","composition","of",":","py",":","func",":","`","torchaudio.transforms.Spectrogram","`","and","and",":","py",":","func",":","`","torchaudio.transforms.BarkScale","`",".","Sources","*","https",":","\/\/www.fon.hum.uva.nl\/praat\/manual\/BarkSpectrogram.html","*","Traunm\u00fcller",",","Hartmut",".","``","Analytical","Expressions","for","the","Tonotopic","Sensory","Scale",".","''","Journal","of","the","Acoustical","*","Society","of","America",".","Vol",".","88",",","Issue","1",",","1990",",","pp",".","97\u2013100",".","*","https",":","\/\/ccrma.stanford.edu\/courses\/120-fall-2003\/lecture-5.html","Args",":","sample_rate","(","int",",","optional",")",":","Sample","rate","of","audio","signal",".","(","Default",":","``","16000","``",")","n_fft","(","int",",","optional",")",":","Size","of","FFT",",","creates","``","n_fft","\/\/","2","+","1","``","bins",".","(","Default",":","``","400","``",")","win_length","(","int","or","None",",","optional",")",":","Window","size",".","(","Default",":","``","n_fft","``",")","hop_length","(","int","or","None",",","optional",")",":","Length","of","hop","between","STFT","windows",".","(","Default",":","``","win_length","\/\/","2","``",")","f_min","(","float",",","optional",")",":","Minimum","frequency",".","(","Default",":","``","0.","``",")","f_max","(","float","or","None",",","optional",")",":","Maximum","frequency",".","(","Default",":","``","None","``",")","pad","(","int",",","optional",")",":","Two","sided","padding","of","signal",".","(","Default",":","``","0","``",")","n_mels","(","int",",","optional",")",":","Number","of","mel","filterbanks",".","(","Default",":","``","128","``",")","window_fn","(","Callable","[","...",",","torch.Tensor","]",",","optional",")",":","A","function","to","create","a","window","tensor","that","is","applied\/multiplied","to","each","frame\/window",".","(","Default",":","``","torch.hann_window","``",")","power","(","float",",","optional",")",":","Exponent","for","the","magnitude","spectrogram",",","(","must","be",">","0",")","e.g.",",","1","for","energy",",","2","for","power",",","etc",".","(","Default",":","``","2","``",")","normalized","(","bool",",","optional",")",":","Whether","to","normalize","by","magnitude","after","stft",".","(","Default",":","``","False","``",")","wkwargs","(","Dict","[","...",",","...","]","or","None",",","optional",")",":","Arguments","for","window","function",".","(","Default",":","``","None","``",")","center","(","bool",",","optional",")",":","whether","to","pad",":","attr",":","`","waveform","`","on","both","sides","so","that","the",":","math",":","`","t","`","-th","frame","is","centered","at","time",":","math",":","`","t","\\times","\\text","{","hop\\_length","}","`",".","(","Default",":","``","True","``",")","pad_mode","(","string",",","optional",")",":","controls","the","padding","method","used","when",":","attr",":","`","center","`","is","``","True","``",".","(","Default",":","``","``","reflect","''","``",")","bark_scale","(","str",",","optional",")",":","Scale","to","use",":","``","traunmuller","``",",","``","schroeder","``","or","``","wang","``",".","(","Default",":","``","traunmuller","``",")","Example",">",">",">","waveform",",","sample_rate","=","torchaudio.load","(","``","test.wav","''",",","normalize=True",")",">",">",">","transform","=","transforms.BarkSpectrogram","(","sample_rate",")",">",">",">","bark_specgram","=","transform","(","waveform",")","#","(","channel",",","n_barks",",","time",")","See","also",":",":","py",":","func",":","`","torchaudio.functional.melscale_fbanks","`","-","The","function","used","to","generate","the","filter","banks","."]
docstr: Args:
      waveform (torch.Tensor): torch.Tensor of audio of dimension (..., time).
  
  Returns:
      torch.Tensor: Bark frequency spectrogram of size (..., ``n_barks``, time).
docstr_tok: ["Args",":","waveform","(","torch.Tensor",")",":","torch.Tensor","of","audio","of","dimension","(","...",",","time",")",".","Returns",":","torch.Tensor",":","Bark","frequency","spectrogram","of","size","(","...",",","``","n_barks","``",",","time",")","."]
code: def forward(self, waveform: torch.Tensor) -> torch.Tensor:
      r"""
      Args:
          waveform (torch.Tensor): torch.Tensor of audio of dimension (..., time).
  
      Returns:
          torch.Tensor: Bark frequency spectrogram of size (..., ``n_barks``, time).
      """
      specgram = self.spectrogram(waveform)
      bark_specgram = self.bark_scale(specgram)
      return bark_specgram
  
imports: from typing import Callable, Optional
  import torch
  from torchaudio.prototype.functional import barkscale_fbanks, chroma_filterbank
  from torchaudio.transforms import Spectrogram
label_desc: Use image node_id 2 for calling the BarkSpectrogram obj's underlying member method code with example usage: obj.forward(waveform) and returns: bark_specgram