class_docstr: Multi-Frequency Discriminator module in UnivNet.
class_docstr_tok: ["Multi-Frequency","Discriminator","module","in","UnivNet","."]
docstr: Initialize Multi-Frequency Discriminator module.
  
  Args:
      hop_lengths (list): List of hop lengths.
      hidden_channels (list): List of number of channels in hidden layers.
      domain (str): Domain of input signal. Default is "double".
      mel_scale (bool): Whether to use mel-scale frequency. Default is True.
      divisors (list): List of divisors for each layer in the discriminator.
                       Default is [32, 16, 8, 4, 2, 1, 1].
      strides (list): List of strides for each layer in the discriminator.
                      Default is [1, 2, 1, 2, 1, 2, 1].
code: def __init__(
      self,
      sample_rate: int = 22050,
      hop_lengths=[128, 256, 512],
      hidden_channels=[256, 512, 512],
      domain="double",
      mel_scale=True,
      divisors=[32, 16, 8, 4, 2, 1, 1],
      strides=[1, 2, 1, 2, 1, 2, 1],
  ):
      """
      Initialize Multi-Frequency Discriminator module.
  
      Args:
          hop_lengths (list): List of hop lengths.
          hidden_channels (list): List of number of channels in hidden layers.
          domain (str): Domain of input signal. Default is "double".
          mel_scale (bool): Whether to use mel-scale frequency. Default is True.
          divisors (list): List of divisors for each layer in the discriminator.
                           Default is [32, 16, 8, 4, 2, 1, 1].
          strides (list): List of strides for each layer in the discriminator.
                          Default is [1, 2, 1, 2, 1, 2, 1].
      """
  
      super().__init__()
  
      # TODO (Yifeng): Maybe use LogMelFbank instead of TorchSTFT
      self.stfts = torch.nn.ModuleList(
          [
              TorchSTFT(
                  sample_rate=sample_rate,
                  fft_size=x * 4,
                  hop_size=x,
                  win_size=x * 4,
                  normalized=True,
                  domain=domain,
                  mel_scale=mel_scale,
              )
              for x in hop_lengths
          ]
      )
  
      self.domain = domain
      if domain == "double":
          self.discriminators = torch.nn.ModuleList(
              [
                  BaseFrequenceDiscriminator(
                      2, c, divisors=divisors, strides=strides
                  )
                  for x, c in zip(hop_lengths, hidden_channels)
              ]
          )
      else:
          self.discriminators = torch.nn.ModuleList(
              [
                  BaseFrequenceDiscriminator(
                      1, c, divisors=divisors, strides=strides
                  )
                  for x, c in zip(hop_lengths, hidden_channels)
              ]
          )
  
imports: import logging
  import math
  from typing import Any, Dict, List, Optional
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_svs.visinger2.ddsp import remove_above_nyquist, scale_function, upsample
  from espnet2.gan_tts.hifigan import HiFiGANMultiPeriodDiscriminator, HiFiGANMultiScaleDiscriminator, HiFiGANMultiScaleMultiPeriodDiscriminator, HiFiGANPeriodDiscriminator, HiFiGANScaleDiscriminator
  from espnet2.gan_tts.hifigan.residual_block import ResidualBlock
label_desc: Use image node_id 1 to create a new MultiFrequencyDiscriminator object from inherited base classes: torch.nn with example: obj = MultiFrequencyDiscriminator(sample_rate, hop_lengths, hidden_channels, domain, mel_scale, divisors, strides)