ISTFTNetOptions

Options & Configuration · AiDotNet.TextToSpeech.Vocoders

Options for iSTFTNet (Kaneko et al. 2022): a HiFi-GAN whose output-side upsampling is replaced by an inverse STFT of a small predicted magnitude and phase spectrogram.

Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → ISTFTNetOptions

For Beginners

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

How It Works

Defaults are the paper’s V1-C8C8I model (§3.2–4.1): HiFi-GAN V1’s generator (512 channels, kernels 3, 7, 11 with dilations 1, 3, 5) with two ×8 upsamplings (kernels 16, 16), then an output convolution to the (16/2 + 1) × 2 magnitude and phase channels of iSTFT(16, 4, 16) — the 1024 / 256 / 1024 analysis divided by the 64× upsampling (Eq. 1); HiFi-GAN’s period and scale discriminators and its LSGAN + 2·feature-matching + 45·mel loss; Adam (β = 0.5, 0.9) at 2e-4; 22.05 kHz audio, 80 mel bands from a 1024-point FFT with hop 256. HiFi-GAN’s configuration supplies what the paper leaves to it (§4.1): the 0.999 per-epoch learning-rate decay, the 8192-sample segments, batch 16, the mel loss up to Nyquist with the input mel up to 8 kHz; the reference iSTFTNet code reflect-pads one frame before the output convolution so the waveform has exactly frames × 256 samples.

Constructors

Constructor Summary
ISTFTNetOptions() Creates the paper’s configuration.
ISTFTNetOptions(ISTFTNetOptions 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 (2).
double LearningRateDecay { get; set; } Gets or sets the per-epoch learning-rate decay (0.999).
double MelLossWeight { get; set; } Gets or sets the mel loss weight (45).
double MelMaxFrequency { get; set; } Gets or sets the input mel’s highest frequency (8000 Hz).
int DiscriminatorWidthDivisor { get; set; } Gets or sets a divisor on every discriminator width (1: the paper’s widths).
int InverseFftSize { get; set; } Gets or sets the inverse STFT’s FFT size (16).
int InverseHopSize { get; set; } Gets or sets the inverse STFT’s hop (4).
int InverseWindowSize { get; set; } Gets or sets the inverse STFT’s window (16).
int ResblockType { get; set; } Gets or sets the residual block type (1, HiFi-GAN V1).
int SamplingSeed { get; set; } Gets or sets the seed of the training segment draws.
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 (788: 12,600 training clips at a batch of 16).
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[] UpsampleKernelSizes { get; set; } Gets or sets the transposed-convolution kernels before the inverse STFT (16, 16).
int[][] ResblockDilationSizes { get; set; } Gets or sets the residual block dilations ((1, 3, 5) for each kernel).