class_docstr: This function is to calculate the Mel-frequency cepstral coefficients (MFCCs) of the input signal.
  This algorithm first extracts Mel spectrograms from the audio clips,
  then the discrete cosine transform is calcuated to obtain the final MFCCs.
  Therefore, the Mel spectrogram part can be made trainable using
  ``trainable_mel`` and ``trainable_STFT``.
  It only support type-II DCT at the moment. 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 calculate the correct ``fmin`` and ``fmax``.
      Setting the correct sampling rate is very important for calculating the correct frequency.
  
  n_mfcc : int
      The number of Mel-frequency cepstral coefficients
  
  norm : string
      The default value is 'ortho'. Normalization for DCT basis
  
  **kwargs
      Other arguments for Melspectrogram such as n_fft, n_mels, hop_length, and window
  
  Returns
  -------
  MFCCs : torch.tensor
      It returns a tensor of MFCCs.  shape = ``(num_samples, n_mfcc, time_steps)``.
  
  Examples
  --------
  >>> spec_layer = Spectrogram.MFCC()
  >>> mfcc = spec_layer(x)
class_docstr_tok: ["This","function","is","to","calculate","the","Mel-frequency","cepstral","coefficients","(","MFCCs",")","of","the","input","signal",".","This","algorithm","first","extracts","Mel","spectrograms","from","the","audio","clips",",","then","the","discrete","cosine","transform","is","calcuated","to","obtain","the","final","MFCCs",".","Therefore",",","the","Mel","spectrogram","part","can","be","made","trainable","using","``","trainable_mel","``","and","``","trainable_STFT","``",".","It","only","support","type-II","DCT","at","the","moment",".","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","calculate","the","correct","``","fmin","``","and","``","fmax","``",".","Setting","the","correct","sampling","rate","is","very","important","for","calculating","the","correct","frequency",".","n_mfcc",":","int","The","number","of","Mel-frequency","cepstral","coefficients","norm",":","string","The","default","value","is","'ortho","'",".","Normalization","for","DCT","basis","*","*","kwargs","Other","arguments","for","Melspectrogram","such","as","n_fft",",","n_mels",",","hop_length",",","and","window","Returns","--","--","--","-","MFCCs",":","torch.tensor","It","returns","a","tensor","of","MFCCs",".","shape","=","``","(","num_samples",",","n_mfcc",",","time_steps",")","``",".","Examples","--","--","--","--",">",">",">","spec_layer","=","Spectrogram.MFCC","(",")",">",">",">","mfcc","=","spec_layer","(","x",")"]
docstr: Convert a batch of waveforms to MFCC.
  
  Parameters
  ----------
  x : torch tensor
      Input signal should be in either of the following shapes.
  
      1. ``(len_audio)``
  
      2. ``(num_audio, len_audio)``
  
      3. ``(num_audio, 1, len_audio)``
      It will be automatically broadcast to the right shape
docstr_tok: ["Convert","a","batch","of","waveforms","to","MFCC",".","Parameters","--","--","--","--","--","x",":","torch","tensor","Input","signal","should","be","in","either","of","the","following","shapes",".","1",".","``","(","len_audio",")","``","2",".","``","(","num_audio",",","len_audio",")","``","3",".","``","(","num_audio",",","1",",","len_audio",")","``","It","will","be","automatically","broadcast","to","the","right","shape"]
code: def forward(self, x):
      """
      Convert a batch of waveforms to MFCC.
  
      Parameters
      ----------
      x : torch tensor
          Input signal should be in either of the following shapes.\n
          1. ``(len_audio)``\n
          2. ``(num_audio, len_audio)``\n
          3. ``(num_audio, 1, len_audio)``
          It will be automatically broadcast to the right shape
      """
  
      x = self.melspec_layer(x)
      x = self._power_to_db(x)
      x = self._dct(x, norm="ortho")[:, : self.m_mfcc, :]
      return x
  
file_path: nnAudio/Installation/nnAudio/features/mel.py
imports: import torch.nn
  import torch
  import numpy
  from time import time
  from ..utils import *
  from .stft import STFT
label_desc: Use image node_id 4 for calling the MFCC obj's underlying member method code with example usage: obj.forward(x) and returns: x