MelGANOptions

Options & Configuration · AiDotNet.TextToSpeech.Vocoders

Options for MelGAN (Kumar et al. 2019): a fully convolutional GAN vocoder with multi-scale window-based discriminators, trained on the hinge loss with feature matching.

Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → MelGANOptions

For Beginners

These options configure the MelGAN model. Default values follow the original paper settings.

How It Works

Defaults are the paper’s (§2, App. A–B) and, where it is silent, its released code (descriptinc/melgan-neurips): ngf 32 (a first width of 512), upsampling ratios 8, 8, 2, 2, three residual blocks per stack; three discriminators of base width 16; λ_FM = 10; Adam (β = 0.5, 0.9) at 1e-4 for both networks, batch 16; 8192-sample segments; the input is the reference’s Audio2Mel (22.05 kHz, 1024-point FFT and window, hop 256, 80 Slaney mel bands, log10(max(x, 1e-5))).

Constructors

Constructor Summary
MelGANOptions() Creates the paper’s configuration.
MelGANOptions(MelGANOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
double Beta1 { get; set; } Gets or sets Adam’s β₁ (0.5).
double Beta2 { get; set; } Gets or sets Adam’s β₂ (0.9).
double FeatureMatchingWeight { get; set; } Gets or sets λ, the feature-matching weight (10).
int DiscriminatorWidthDivisor { get; set; } Gets or sets a divisor on every discriminator width (1: the paper’s widths).
int Ngf { get; set; } Gets or sets the generator’s base width ngf (32); the first convolution has ngf · 2^ratios channels.
int NumDiscriminators { get; set; } Gets or sets the number of discriminators (3: raw audio, ×2 and ×4 downsampled).
int ResidualLayers { get; set; } Gets or sets the residual blocks per stack (3: dilations 1, 3, 9).
int SamplingSeed { get; set; } Gets or sets the seed of the recording amplitude and training segment draws.
int SegmentSize { get; set; } Gets or sets the training segment in samples (8192).
int WindowSize { get; set; } Gets or sets the STFT window of the input features (1024).