class_docstr: This alogrithm uses the method proposed in [1], which would run extremely slow if low frequencies (below 220Hz)
  are included in the frequency bins.
  Please refer to :func:`~nnAudio.Spectrogram.CQT1992v2` for a more
  computational and memory efficient version.
  [1] Brown, Judith C.C. and Miller Puckette. “An efficient algorithm for the calculation of a
  constant Q transform.” (1992).
  
  This function is to calculate the CQT of the input signal.
  Input signal should be in either of the following shapes.
  
  1. ``(len_audio)``
  
  2. ``(num_audio, len_audio)``
  
  3. ``(num_audio, 1, len_audio)``
  
  The correct shape will be inferred autommatically if the input follows these 3 shapes.
  Most of the arguments follow the convention from librosa.
  This class inherits from ``nn.Module``, therefore, the usage is same as ``nn.Module``.
  
  
  
  Parameters
  ----------
  sr : int
      The sampling rate for the input audio. It is used to calucate the correct ``fmin`` and ``fmax``.
      Setting the correct sampling rate is very important for calculating the correct frequency.
  
  hop_length : int
      The hop (or stride) size. Default value is 512.
  
  fmin : float
      The frequency for the lowest CQT bin. Default is 32.70Hz, which coresponds to the note C0.
  
  fmax : float
      The frequency for the highest CQT bin. Default is ``None``, therefore the higest CQT bin is
      inferred from the ``n_bins`` and ``bins_per_octave``.
      If ``fmax`` is not ``None``, then the argument ``n_bins`` will be ignored and ``n_bins``
      will be calculated automatically. Default is ``None``
  
  n_bins : int
      The total numbers of CQT bins. Default is 84. Will be ignored if ``fmax`` is not ``None``.
  
  bins_per_octave : int
      Number of bins per octave. Default is 12.
  
  trainable_STFT : bool
      Determine if the time to frequency domain transformation kernel for the input audio is trainable or not.
      Default is ``False``
  
  trainable_CQT : bool
      Determine if the frequency domain CQT kernel is trainable or not.
      Default is ``False``
  
  norm : int
      Normalization for the CQT kernels. ``1`` means L1 normalization, and ``2`` means L2 normalization.
      Default is ``1``, which is same as the normalization used in librosa.
  
  window : str
      The windowing function for CQT. It uses ``scipy.signal.get_window``, please refer to
      scipy documentation for possible windowing functions. The default value is 'hann'.
  
  center : bool
      Putting the CQT keneral at the center of the time-step or not. If ``False``, the time index is
      the beginning of the CQT kernel, if ``True``, the time index is the center of the CQT kernel.
      Default value if ``True``.
  
  pad_mode : str
      The padding method. Default value is 'reflect'.
  
  trainable : bool
      Determine if the CQT kernels are trainable or not. If ``True``, the gradients for CQT kernels
      will also be caluclated and the CQT kernels will be updated during model training.
      Default value is ``False``.
  
   output_format : str
      Determine the return type.
      ``Magnitude`` will return the magnitude of the STFT result, shape = ``(num_samples, freq_bins,time_steps)``;
      ``Complex`` will return the STFT result in complex number, shape = ``(num_samples, freq_bins,time_steps, 2)``;
      ``Phase`` will return the phase of the STFT reuslt, shape = ``(num_samples, freq_bins,time_steps, 2)``.
      The complex number is stored as ``(real, imag)`` in the last axis. Default value is 'Magnitude'.
  
  verbose : bool
      If ``True``, it shows layer information. If ``False``, it suppresses all prints
  
  Returns
  -------
  spectrogram : torch.tensor
  It returns a tensor of spectrograms.
  shape = ``(num_samples, freq_bins,time_steps)`` if ``output_format='Magnitude'``;
  shape = ``(num_samples, freq_bins,time_steps, 2)`` if ``output_format='Complex' or 'Phase'``;
  
  Examples
  --------
  >>> spec_layer = Spectrogram.CQT1992v2()
  >>> specs = spec_layer(x)
class_docstr_tok: ["This","alogrithm","uses","the","method","proposed","in","[","1","]",",","which","would","run","extremely","slow","if","low","frequencies","(","below","220Hz",")","are","included","in","the","frequency","bins",".","Please","refer","to",":","func",":","`","~nnAudio.Spectrogram.CQT1992v2","`","for","a","more","computational","and","memory","efficient","version",".","[","1","]","Brown",",","Judith","C.C",".","and","Miller","Puckette",".","\u201c","An","efficient","algorithm","for","the","calculation","of","a","constant","Q","transform.","\u201d","(","1992",")",".","This","function","is","to","calculate","the","CQT","of","the","input","signal",".","Input","signal","should","be","in","either","of","the","following","shapes",".","1",".","``","(","len_audio",")","``","2",".","``","(","num_audio",",","len_audio",")","``","3",".","``","(","num_audio",",","1",",","len_audio",")","``","The","correct","shape","will","be","inferred","autommatically","if","the","input","follows","these","3","shapes",".","Most","of","the","arguments","follow","the","convention","from","librosa",".","This","class","inherits","from","``","nn.Module","``",",","therefore",",","the","usage","is","same","as","``","nn.Module","``",".","Parameters","--","--","--","--","--","sr",":","int","The","sampling","rate","for","the","input","audio",".","It","is","used","to","calucate","the","correct","``","fmin","``","and","``","fmax","``",".","Setting","the","correct","sampling","rate","is","very","important","for","calculating","the","correct","frequency",".","hop_length",":","int","The","hop","(","or","stride",")","size",".","Default","value","is","512.","fmin",":","float","The","frequency","for","the","lowest","CQT","bin",".","Default","is","32.70Hz",",","which","coresponds","to","the","note","C0",".","fmax",":","float","The","frequency","for","the","highest","CQT","bin",".","Default","is","``","None","``",",","therefore","the","higest","CQT","bin","is","inferred","from","the","``","n_bins","``","and","``","bins_per_octave","``",".","If","``","fmax","``","is","not","``","None","``",",","then","the","argument","``","n_bins","``","will","be","ignored","and","``","n_bins","``","will","be","calculated","automatically",".","Default","is","``","None","``","n_bins",":","int","The","total","numbers","of","CQT","bins",".","Default","is","84",".","Will","be","ignored","if","``","fmax","``","is","not","``","None","``",".","bins_per_octave",":","int","Number","of","bins","per","octave",".","Default","is","12.","trainable_STFT",":","bool","Determine","if","the","time","to","frequency","domain","transformation","kernel","for","the","input","audio","is","trainable","or","not",".","Default","is","``","False","``","trainable_CQT",":","bool","Determine","if","the","frequency","domain","CQT","kernel","is","trainable","or","not",".","Default","is","``","False","``","norm",":","int","Normalization","for","the","CQT","kernels",".","``","1","``","means","L1","normalization",",","and","``","2","``","means","L2","normalization",".","Default","is","``","1","``",",","which","is","same","as","the","normalization","used","in","librosa",".","window",":","str","The","windowing","function","for","CQT",".","It","uses","``","scipy.signal.get_window","``",",","please","refer","to","scipy","documentation","for","possible","windowing","functions",".","The","default","value","is","'hann","'",".","center",":","bool","Putting","the","CQT","keneral","at","the","center","of","the","time-step","or","not",".","If","``","False","``",",","the","time","index","is","the","beginning","of","the","CQT","kernel",",","if","``","True","``",",","the","time","index","is","the","center","of","the","CQT","kernel",".","Default","value","if","``","True","``",".","pad_mode",":","str","The","padding","method",".","Default","value","is","'reflect","'",".","trainable",":","bool","Determine","if","the","CQT","kernels","are","trainable","or","not",".","If","``","True","``",",","the","gradients","for","CQT","kernels","will","also","be","caluclated","and","the","CQT","kernels","will","be","updated","during","model","training",".","Default","value","is","``","False","``",".","output_format",":","str","Determine","the","return","type",".","``","Magnitude","``","will","return","the","magnitude","of","the","STFT","result",",","shape","=","``","(","num_samples",",","freq_bins",",","time_steps",")","``",";","``","Complex","``","will","return","the","STFT","result","in","complex","number",",","shape","=","``","(","num_samples",",","freq_bins",",","time_steps",",","2",")","``",";","``","Phase","``","will","return","the","phase","of","the","STFT","reuslt",",","shape","=","``","(","num_samples",",","freq_bins",",","time_steps",",","2",")","``",".","The","complex","number","is","stored","as","``","(","real",",","imag",")","``","in","the","last","axis",".","Default","value","is","'Magnitude","'",".","verbose",":","bool","If","``","True","``",",","it","shows","layer","information",".","If","``","False","``",",","it","suppresses","all","prints","Returns","--","--","--","-","spectrogram",":","torch.tensor","It","returns","a","tensor","of","spectrograms",".","shape","=","``","(","num_samples",",","freq_bins",",","time_steps",")","``","if","``","output_format='Magnitude","'","``",";","shape","=","``","(","num_samples",",","freq_bins",",","time_steps",",","2",")","``","if","``","output_format='Complex","'","or","'Phase","'","``",";","Examples","--","--","--","--",">",">",">","spec_layer","=","Spectrogram.CQT1992v2","(",")",">",">",">","specs","=","spec_layer","(","x",")"]
code: def extra_repr(self) -> str:
      return "STFT kernel size = {}, CQT kernel size = {}".format(
          (*self.wcos.shape,), (*self.cqt_kernels_real.shape,)
      )
  
imports: import torch.nn
  import torch
  import numpy
  from time import time
  from ..utils import *
  from ..utils import *
label_desc: Use image node_id 3 for calling the CQT1992 obj's underlying member method code with example usage: obj.extra_repr() and returns: str