GPTSoVITSOptions

Options & Configuration · AiDotNet.TextToSpeech.CodecBased

Options for GPTSoVITS.

Inheritance: ModelOptions → GPTSoVITSOptions

For Beginners

GPT-SoVITS copies a voice from a few seconds of recording: a GPT writes “semantic tokens” for the text, and a second network turns them into speech in the reference voice. Pick a Version to match the weights you load; the rest can usually stay as it is.

How It Works

GPT-SoVITS has no paper; the release (RVC-Boss/GPT-SoVITS) defines it. The defaults are its v2ProPlus configuration (s1longer-v2.yaml, s2v2ProPlus.json) and the inference interface’s defaults. The sizes marked “by version” follow Version unless set.

Constructors

Constructor Summary
GPTSoVITSOptions() Creates v2ProPlus’s configuration.

Properties

Property Summary
GptSoVitsStage CurrentStage { get; set; } The network GPTSoVITS’s training updates.
GptSoVitsTextCut Cut { get; set; } How the target text is cut into sentences (the interface’s default: every four sentences).
GptSoVitsTextLanguage PromptLanguage { get; set; } How the voice’s prompt text is read (the interface’s default: Chinese).
GptSoVitsTextLanguage TextLanguage { get; set; } How the target text’s language is read (the interface’s default: Chinese).
GptSoVitsVersion Version { get; set; } The release followed (v2ProPlus).
OnnxModelOptions OnnxOptions { get; set; } Settings for the ONNX graph runtime.
bool UseDpo { get; set; } Whether s1 adds the reference-free DPO loss (if_dpo; off by default).
double Beta1 { get; set; } s2’s AdamW β₁ (0.8).
double Beta2 { get; set; } s2’s AdamW β₂ (0.99).
double Epsilon { get; set; } s2’s AdamW ε (1e-9).
double KlLossWeight { get; set; } The KL loss’s weight (1).
double LearningRateDecay { get; set; } s2’s per-epoch learning-rate decay (0.999875).
double MelLossWeight { get; set; } The mel loss’s weight (45).
double NoiseScale { get; set; } The prior’s noise scale in the GAN synthesizer’s decode (0.5).
double PauseSeconds { get; set; } Silence after each sentence, in seconds (0.3).
double RepetitionPenalty { get; set; } The repetition penalty (1.35).
double Speed { get; set; } The speaking rate (1).
double SynthesizerLearningRate { get; set; } s2’s AdamW learning rate (1e-4).
double T2SLearningRate { get; set; } s1’s ScaledAdam learning rate before its first step (0.01; the release’s schedule then holds 0.002).
double T2SLockedLearningRate { get; set; } The rate s1’s schedule locks to after the first step (0.002).
double Temperature { get; set; } The sampling temperature (the interface’s 1).
double TextLowLearningRate { get; set; } The rate factor of the text embedding, the text Transformer and MRTE in the GAN stage (0.4).
double TopP { get; set; } Top-p of semantic sampling (the interface’s 1).
double WeightDecay { get; set; } The native s2 AdamW weight decay (0.01).
double? CfgRate { get; set; } Classifier-free guidance (null: 1.3 for v5dev, none otherwise; only V5 reads it).
double? SynthesizerDropout { get; set; } The synthesizer’s dropout (by version: 0.1 from s2.json, 0 for v2Pro and v2ProPlus).
int BertHeads { get; set; } chinese-roberta-wwm-ext-large’s heads (16).
int BertHidden { get; set; } chinese-roberta-wwm-ext-large’s width (1024; the GPT’s BERT features).
int BertIntermediate { get; set; } chinese-roberta-wwm-ext-large’s feed-forward width (4096).
int BertLayers { get; set; } chinese-roberta-wwm-ext-large’s layers (24; the features are hidden state −3).
int BridgeChannels { get; set; } The bridge’s and wns1’s width (512).
int DiscriminatorWidthDivisor { get; set; } Divides GAN discriminator channel widths (1 retains the complete released architecture).
int DitConvLayers { get; set; } The DiT’s ConvNeXt blocks over the features (4).
int DitDepth { get; set; } The DiT’s blocks (22).
int DitDim { get; set; } The DiT’s width (1024).
int DitHeadDim { get; set; } The DiT’s head width (64).
int DitHeads { get; set; } The DiT’s heads (16).
int HiddenDim { get; set; } The semantic GPT’s width (512).
int HopSize { get; set; } The GAN’s samples per generated latent frame (640).
int HubertHeads { get; set; } chinese-hubert-base’s heads (12).
int HubertHidden { get; set; } chinese-hubert-base’s width (768; the SSL features the synthesizer quantizes).
int HubertIntermediate { get; set; } chinese-hubert-base’s feed-forward width (3072).
int HubertLayers { get; set; } chinese-hubert-base’s layers (12).
int HubertPositionGroups { get; set; } The position convolution’s groups (16).
int HubertPositionKernel { get; set; } The position convolution’s kernel (128).
int InterChannels { get; set; } The prior’s channels (192).
int LoraRank { get; set; } The flow-matching stage’s LoRA rank (32, the interface’s default; 0 trains the whole synthesizer).
int MaxSeconds { get; set; } The longest generation in seconds of 50 Hz semantic tokens (max_sec, 54).
int MaxTextLength { get; set; } The input length advertised to TTS clients (1000).
int MelChannels { get; set; } The GAN objective’s mel bands (128 in the release).
int MrteChannels { get; set; } MRTE’s width (512).
int NumHeads { get; set; } The semantic GPT’s attention heads (16).
int SampleRate { get; } The release’s output rate: 32 kHz for GAN versions, 24 kHz for v3, 48 kHz for v4/V5.
int SamplingSeed { get; set; } The seed of semantic sampling and of the synthesizer’s noise.
int SegmentSize { get; set; } The generator’s training segment in samples (20480: 32 frames).
int SemanticCodebookSize { get; set; } The semantic codebook’s size (1024; the GPT’s vocabulary is this plus the end token).
int SpeakerChannels { get; set; } ERes2NetV2’s base width (64; v2Pro’s 20,480-dimensional embedding is 8 · 4 · 10 times it).
int StyleHidden { get; set; } The style encoder’s hidden width (128).
int SynthesizerFilter { get; set; } The text encoder’s feed-forward width (768).
int SynthesizerHeads { get; set; } The text encoder’s heads (2).
int SynthesizerHidden { get; set; } The text encoder’s width (192).
int SynthesizerLayers { get; set; } The text encoder’s layers (6; its SSL and third Transformers have half).
int T2SAccumulation { get; set; } Batches s1 sums before each step (4: it steps at batch_idx > 0 and batch_idx % 4 == 0).
int T2SLayers { get; set; } The GPT’s layers (24); its width is HiddenDim (512) and its heads NumHeads (16).
int TopK { get; set; } Top-k of semantic sampling (the interface’s 15).
int TrainingSeed { get; set; } The training draws’ seed.
int? SampleSteps { get; set; } Euler steps of flow matching (null: the release’s 32 for v3 and v5dev, 8 for v4, 4 for v5turbo).
int? StyleChannels { get; set; } The style vector’s width (by version: 512 for v1, v2 and v3 to V5, 1024 for v2Pro and v2ProPlus).
int? UpdatesPerEpoch { get; set; } Training steps per epoch, over which LearningRateDecay applies once (the dataset’s batch count; null decays nothing).
int? UpsampleInitialChannels { get; set; } The GAN generator’s first width (by version: 512; 768 for v2ProPlus).
int? VocoderInitialChannels { get; set; } The vocoder’s first width (by version: BigVGAN’s 1536 for v3; 512 for v4 and V5).
int[] HubertConvDims { get; set; } The feature encoder’s convolution widths (512 each).
int[] ResblockKernels { get; set; } The GAN generator’s residual-block kernels (3, 7, 11).
int[] SpeakerBlocks { get; set; } ERes2NetV2’s blocks per stage (3, 4, 6, 3).
int[] UpsampleKernels { get; set; } The GAN generator’s transposed-convolution kernels (by version: 16, 16, 8, 2, 2; 20, 16, 8, 2, 2 for v2ProPlus).
int[] UpsampleRates { get; set; } The GAN generator’s upsampling rates (10, 8, 2, 2, 2: 640 samples per frame).
int[] VocoderResblockKernels { get; set; } The vocoder’s residual-block kernels (3, 7, 11).
int[] VocoderUpsampleKernels { get; set; } The vocoder’s upsampling kernels (by version: 8, 8, 4, 4, 4, 4 for v3; 20, 12, 4, 4, 4 after).
int[] VocoderUpsampleRates { get; set; } The vocoder’s upsampling rates (by version: 4, 4, 2, 2, 2, 2 for v3; 10, 6, 2, 2, 2 after).
int[][] ResblockDilations { get; set; } The GAN generator’s residual-block dilations (1, 3, 5 each).
int[][] VocoderResblockDilations { get; set; } The vocoder’s residual-block dilations (1, 3, 5 each).
string G2pwDirectory { get; set; } The G2PW model directory (G2PWModel_1.1 with g2pW.onnx), which Chinese after v1 needs.
string LanguageModelPath { get; set; } fastText’s language identifier (lid.176.bin), which every language setting but English needs.
string ModelPath { get; set; } The exported ONNX graph path, when used.
string OpenJTalkDictionaryPath { get; set; } Open JTalk’s dictionary directory (open_jtalk_dic_utf_8-1.11), which Japanese needs.