VocosOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options for Vocos (Siuzdak 2024): a ConvNeXt backbone at frame rate whose head predicts STFT magnitude and phase, inverted by the iSTFT, trained against multi-period and multi-resolution discriminators.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → VocosOptions
For Beginners
These options configure the Vocos model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s (§3.2–3.3, §4.1): 24 kHz LibriTTS audio with 100-band mel input from a 1024-point FFT with hop 256; a 512-wide backbone of 8 ConvNeXt blocks with a 1536-wide bottleneck; the hinge loss, feature matching and the mel L1; AdamW (β = 0.9, 0.999) at 2e-4 with a cosine decay over 1M steps per network; 16,384-sample segments, batch 16; the multi-resolution discriminator of Jang et al. 2021 (UnivNet’s resolutions (1024, 120, 600), (2048, 240, 1200), (512, 50, 240)) and HiFi-GAN’s multi-period discriminator.
What the paper leaves open follows gemelo-ai/vocos (configs/vocos.yaml, experiment.py): λ_mel = 45;
the multi-resolution terms weighted 0.1; adversarial and feature-matching terms averaged per discriminator family;
mel features from torchaudio’s MelSpectrogram (centred, magnitude, HTK scale) with log(max(x, 1e-7));
the magnitude clipped at 100.
Constructors
| Constructor | Summary |
|---|---|
VocosOptions() |
Creates the paper’s configuration. |
VocosOptions(VocosOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double Beta1 { get; set; } |
Gets or sets AdamW’s β₁ (0.9). |
double Beta2 { get; set; } |
Gets or sets AdamW’s β₂ (0.999). |
double MelLossWeight { get; set; } |
Gets or sets λ_mel (45). |
double ResolutionLossWeight { get; set; } |
Gets or sets the weight of the resolution discriminators’ terms (0.1). |
int ConvNeXtDim { get; set; } |
Gets or sets the backbone width d (512). |
int CosineSteps { get; set; } |
Gets or sets the steps of each network’s cosine decay (1,000,000). |
int DiscriminatorWidthDivisor { get; set; } |
Gets or sets a divisor on the period discriminators’ widths (1: the paper’s). |
int HiddenDim { get; set; } |
The width of the actual ConvNeXt backbone. |
int IntermediateDim { get; set; } |
Gets or sets the bottleneck width (1536). |
int NumBackboneBlocks { get; set; } |
Gets or sets the ConvNeXt blocks (8). |
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 the reference initialization. |
int SegmentSize { get; set; } |
Gets or sets the training segment in samples (16,384). |
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). |