espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiBandDiscriminator
Less than 1 minute
espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiBandDiscriminator
class espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiBandDiscriminator(window_length: int, hop_factor: float = 0.25, sample_rate: int = 44100, bands: list = [(0.0, 0.1), (0.1, 0.25), (0.25, 0.5), (0.5, 0.75), (0.75, 1.0)], channel: int = 32)
Bases: Module
Complex multi-band spectrogram discriminator.
- Parameters:
- window_length (int) – Window length of STFT.
- hop_factor (float , optional) – Hop factor of the STFT, defaults to
0.25 * window_length
. - sample_rate (int , optional) – Sampling rate of audio in Hz, by default 44100
- bands (list , optional) – Bands to run discriminator over.
forward(x)
Defines the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
spectrogram(x)