BigVGANOptions

Options & Configuration · AiDotNet.TextToSpeech.Vocoders

Options for BigVGAN (Lee et al. 2023): a HiFi-GAN generator with anti-aliased Snake activations, trained with multi-period and multi-resolution discriminators.

Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → BigVGANOptions

For Beginners

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

How It Works

Defaults are the paper’s 112M-parameter BigVGAN (§3.4, §4.2, Table 6): 24 kHz LibriTTS audio with 100-band log-mel input up to 12 kHz from a 1024-point FFT with hop 256; h = 1536; upsampling 4, 4, 2, 2, 2, 2 (kernels 8, 8, 4, 4, 4, 4); AMP kernels 3, 7, 11 with dilations 1, 3, 5; period discriminators 2, 3, 5, 7, 11 and resolution discriminators (1024, 120, 600), (2048, 240, 1200), (512, 50, 240); batch 32, 8192-sample segments, learning rate 1e-4; gradient norms clipped at 1000. HiFi-GAN’s official configuration supplies the rest, as the paper states (§4.2): AdamW (β = 0.8, 0.99, PyTorch’s weight decay 0.01) decayed 0.999 per epoch, λ_FM = 2, λ_mel = 45 with the loss mel to Nyquist. Base gives BigVGAN-base (h = 512, upsampling 8, 8, 2, 2 with kernels 16, 16, 4, 4; 14M parameters).

Constructors

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

Properties

Property Summary
double Beta1 { get; set; } Gets or sets AdamW’s β₁ (0.8).
double Beta2 { get; set; } Gets or sets AdamW’s β₂ (0.99).
double FeatureMatchingWeight { get; set; } Gets or sets λ_FM (2).
double GradientClipNorm { get; set; } Gets or sets the gradient-norm clip of the generator and of each discriminator family (1000).
double LearningRateDecay { get; set; } Gets or sets the per-epoch learning-rate decay (0.999).
double MelLossWeight { get; set; } Gets or sets λ_mel (45).
double MelMaxFrequency { get; set; } Gets or sets the input mel’s highest frequency (12,000 Hz).
int DiscriminatorWidthDivisor { get; set; } Gets or sets a divisor on the period discriminators’ widths (1: the paper’s).
int ResolutionDiscriminatorChannels { get; set; } Gets or sets the resolution discriminators’ channels (32).
int SamplingSeed { get; set; } Gets or sets the seed of the training draws and of the reference initialization.
int SegmentSize { get; set; } Gets or sets the training segment in samples (8192).
int UpdatesPerEpoch { get; set; } Gets or sets the updates in one epoch (11,087: LibriTTS train-full’s 354,780 utterances at a batch of 32).
int WindowSize { get; set; } Gets or sets the analysis window of the input features (1024).
int[] DiscriminatorPeriods { get; set; } Gets or sets the period discriminators’ periods (2, 3, 5, 7, 11).
int[] ResolutionFftSizes { get; set; } Gets or sets the resolution discriminators’ FFT sizes (1024, 2048, 512).
int[] ResolutionHopSizes { get; set; } Gets or sets the resolution discriminators’ hops (120, 240, 50).
int[] ResolutionWindowSizes { get; set; } Gets or sets the resolution discriminators’ windows (600, 1200, 240).
int[] UpsampleKernelSizes { get; set; } Gets or sets the transposed-convolution kernels (8, 8, 4, 4, 4, 4 for BigVGAN).
int[][] ResblockDilationSizes { get; set; } Gets or sets the AMP blocks’ dilations ((1, 3, 5) for each kernel).

Methods

Method Summary
BigVGANOptions Base() BigVGAN-base: h = 512, upsampling 8, 8, 2, 2 with kernels 16, 16, 4, 4 (14M parameters).