class_docstr: Mel-spectrogram loss.
class_docstr_tok: ["Mel-spectrogram","loss","."]
docstr: Initialize Mel-spectrogram loss.
  
  Args:
      fs (int): Sampling rate.
      n_fft (int): FFT points.
      hop_length (int): Hop length.
      win_length (Optional[int]): Window length.
      window (str): Window type.
      n_mels (int): Number of Mel basis.
      fmin (Optional[int]): Minimum frequency for Mel.
      fmax (Optional[int]): Maximum frequency for Mel.
      center (bool): Whether to use center window.
      normalized (bool): Whether to use normalized one.
      onesided (bool): Whether to use oneseded one.
      log_base (Optional[float]): Log base value.
docstr_tok: ["Initialize","Mel-spectrogram","loss",".","Args",":","fs","(","int",")",":","Sampling","rate",".","n_fft","(","int",")",":","FFT","points",".","hop_length","(","int",")",":","Hop","length",".","win_length","(","Optional","[","int","]",")",":","Window","length",".","window","(","str",")",":","Window","type",".","n_mels","(","int",")",":","Number","of","Mel","basis",".","fmin","(","Optional","[","int","]",")",":","Minimum","frequency","for","Mel",".","fmax","(","Optional","[","int","]",")",":","Maximum","frequency","for","Mel",".","center","(","bool",")",":","Whether","to","use","center","window",".","normalized","(","bool",")",":","Whether","to","use","normalized","one",".","onesided","(","bool",")",":","Whether","to","use","oneseded","one",".","log_base","(","Optional","[","float","]",")",":","Log","base","value","."]
code: def __init__(
      self,
      fs: int = 22050,
      n_fft: int = 1024,
      hop_length: int = 256,
      win_length: Optional[int] = None,
      window: str = "hann",
      n_mels: int = 80,
      fmin: Optional[int] = 0,
      fmax: Optional[int] = None,
      center: bool = True,
      normalized: bool = False,
      onesided: bool = True,
      log_base: Optional[float] = 10.0,
  ):
      """Initialize Mel-spectrogram loss.
  
      Args:
          fs (int): Sampling rate.
          n_fft (int): FFT points.
          hop_length (int): Hop length.
          win_length (Optional[int]): Window length.
          window (str): Window type.
          n_mels (int): Number of Mel basis.
          fmin (Optional[int]): Minimum frequency for Mel.
          fmax (Optional[int]): Maximum frequency for Mel.
          center (bool): Whether to use center window.
          normalized (bool): Whether to use normalized one.
          onesided (bool): Whether to use oneseded one.
          log_base (Optional[float]): Log base value.
  
      """
      super().__init__()
      self.wav_to_mel = LogMelFbank(
          fs=fs,
          n_fft=n_fft,
          hop_length=hop_length,
          win_length=win_length,
          window=window,
          n_mels=n_mels,
          fmin=fmin,
          fmax=fmax,
          center=center,
          normalized=normalized,
          onesided=onesided,
          log_base=log_base,
      )
  
imports: from typing import List, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from espnet2.tts.feats_extract.log_mel_fbank import LogMelFbank
label_desc: Use image node_id 1 to create a new MelSpectrogramLoss object from inherited base classes: torch.nn with example: obj = MelSpectrogramLoss(fs, n_fft, hop_length, win_length, window, n_mels, fmin, fmax, center, normalized, onesided, log_base)