espnet2.gan_svs.visinger2.visinger2_vocoder.Generator_Noise
espnet2.gan_svs.visinger2.visinger2_vocoder.Generator_Noise
class espnet2.gan_svs.visinger2.visinger2_vocoder.Generator_Noise(win_length: int = 1024, hop_length: int = 256, n_fft: int = 1024, hidden_channels: int = 192, kernel_size: int = 3, padding: int = 1, dropout_rate: float = 0.1)
Bases: Module
Initialize the Generator_Noise module.
Args: : win_length (int, optional): Window length. If None, set to n_fft. hop_length (int): Hop length. n_fft (int): FFT size. hidden_channels (int): Number of hidden representation channels. kernel_size (int): Size of the convolutional kernel. padding (int): Size of the padding applied to the input. dropout_rate (float): Dropout rate.
Examples: : ```python
generator = Generator_Noise(win_length=1024, hop_length=256) x = torch.randn(1, 192, 100) # Example input tensor mask = torch.ones(1, 1, 100) # Example mask tensor output = generator(x, mask) print(output.shape) # Output shape will be (1, 1, 25600)
Returns: : Tensor: Output tensor (B, 1, T * hop_size).
Initialize the Generator_Noise module.
- Parameters:
- win_length (int , optional) – Window length. If None, set to n_fft.
- hop_length (int) – Hop length.
- n_fft (int) – FFT size.
- hidden_channels (int) – Number of hidden representation channels.
- kernel_size (int) – Size of the convolutional kernel.
- padding (int) – Size of the padding applied to the input.
- dropout_rate (float) – Dropout rate.
forward(x, mask)
Initialize the Generator_Noise module.
- Parameters:
- win_length (int , optional) – Window length. If None, set to n_fft.
- hop_length (int) – Hop length.
- n_fft (int) – FFT size.
- hidden_channels (int) – Number of hidden representation channels.
- kernel_size (int) – Size of the convolutional kernel.
- padding (int) – Size of the padding applied to the input.
- dropout_rate (float) – Dropout rate.