espnet2.gan_svs.visinger2.visinger2_vocoder.MultiFrequencyDiscriminator
Less than 1 minute
espnet2.gan_svs.visinger2.visinger2_vocoder.MultiFrequencyDiscriminator
class espnet2.gan_svs.visinger2.visinger2_vocoder.MultiFrequencyDiscriminator(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])
Bases: Module
Multi-Frequency Discriminator module in UnivNet.
Initialize Multi-Frequency Discriminator module.
- Parameters:
- 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].
forward(x)
Forward pass of Multi-Frequency Discriminator module.
- Parameters:x (Tensor) – Input tensor (B, 1, T * hop_size).
- Returns: List of feature maps.
- Return type: List[Tensor]