EmotiVoiceOptions
Options & Configuration · AiDotNet.TextToSpeech.StyleEmotion
Options for EmotiVoice.
Inheritance: ModelOptions → TtsModelOptions → EmotiVoiceOptions
For Beginners
These settings size EmotiVoice’s networks; the defaults reproduce the released model.
How It Works
EmotiVoice has no paper: the defaults are its released configuration (netease-youdao/EmotiVoice
config/joint/config.py and config.yaml): 16 kHz audio, 80 mel bins up to 8 kHz from a 1024-point FFT with
a 256-sample hop; 384-wide four-block Transformer encoder and decoder (8 heads, kernel-3 feed-forward of 1536,
dropout 0.2); 2014 speakers and 502 phoneme tokens; SimBERT (BERT-base Chinese, 13,685 tokens) embeddings of the
emotion prompt and of the text; HiFi-GAN V1 (upsampling 8·8·2·2) trained jointly on 32-frame segments; Adam
(rate 1.25e-5, β = 0.5, 0.9) with an exponential decay of 0.999875 per epoch.
Constructors
| Constructor | Summary |
|---|---|
EmotiVoiceOptions() |
Creates the released configuration. |
EmotiVoiceOptions(EmotiVoiceOptions other) |
Copies another instance. |
Properties
| Property | Summary |
|---|---|
bool TrimSilence { get; set; } |
Whether training trims the recording’s silence (below 0.5 % of its peak) and pads 50 ms on each side, as the released data loader does (true). |
double Beta1 { get; set; } |
Adam β₁ (0.5). |
double Beta2 { get; set; } |
Adam β₂ (0.9). |
double BinarizationWeight { get; set; } |
Weight of the binarization loss (2). |
double DurationDropout { get; set; } |
Dropout of the duration predictor (0.5). |
double EnergyMean { get; set; } |
Energy normalization mean (30.610). |
double EnergyStd { get; set; } |
Energy normalization standard deviation (21.78). |
double Epsilon { get; set; } |
Adam ε (1e-9). |
double ForwardSumWeight { get; set; } |
Weight of the forward-sum loss (2). |
double LearningRateDecay { get; set; } |
Learning-rate decay per epoch (0.999875). |
double MelLossWeight { get; set; } |
Weight of the mel L1 loss (45). |
double MelMaxFrequency { get; set; } |
Highest mel frequency (8000 Hz). |
double MelMinFrequency { get; set; } |
Lowest mel frequency (0 Hz). |
double PitchMean { get; set; } |
Pitch normalization mean (225.089 Hz). |
double PitchStd { get; set; } |
Pitch normalization standard deviation (53.78). |
double VarianceDropout { get; set; } |
Dropout of the pitch and energy predictors (0.1). |
int DecoderLayers { get; set; } |
Decoder blocks (4). |
int DiscriminatorWidthDivisor { get; set; } |
A divisor on every width of HiFi-GAN’s multi-period and multi-scale discriminators (1: the released 32–1024 channels). |
int DurationKernel { get; set; } |
Kernel of the duration predictor (3). |
int DurationLayers { get; set; } |
Convolutions of the duration predictor (2). |
int EmotionLabels { get; set; } |
Emotion classes of the style encoder’s pre-training (7: 普通 生气 开心 惊讶 悲伤 厌恶 恐惧). |
int EncoderLayers { get; set; } |
Encoder blocks (4). |
int EnergyLabels { get; set; } |
Energy classes (3). |
int EnergyLayers { get; set; } |
Convolutions of the energy predictor (2). |
int FeedForwardKernel { get; set; } |
Kernel of the blocks’ convolutional feed-forward (3); its width is 4 × HiddenDim. |
int Heads { get; set; } |
Attention heads of the encoder and decoder (8). |
int PitchLabels { get; set; } |
Pitch classes (3: normal, high, low). |
int PitchLayers { get; set; } |
Convolutions of the pitch predictor (3). |
int SamplingSeed { get; set; } |
Seed of the training draws and of dropout. |
int SegmentFrames { get; set; } |
Frames of the random segment the vocoder trains on (32). |
int SpeakerCount { get; set; } |
Speakers in the speaker table (2014, the released list). |
int SpeedLabels { get; set; } |
Speed classes (3). |
int StyleBertHeads { get; set; } |
SimBERT’s heads (12). |
int StyleBertHidden { get; set; } |
SimBERT’s width (768). |
int StyleBertIntermediate { get; set; } |
SimBERT’s feed-forward width (3072). |
int StyleBertLayers { get; set; } |
SimBERT’s layers (12). |
int UpdatesPerEpoch { get; set; } |
Updates per epoch, after which the learning rate decays (0: never; the released code decays once per epoch of your data — set it for yours). |
int UpsampleInitialChannels { get; set; } |
HiFi-GAN’s first width (512). |
int VarianceChannels { get; set; } |
Channels of the variance predictors (384). |
int VarianceEmbedKernel { get; set; } |
Kernel of the pitch and energy embedding convolutions (9). |
int VarianceKernel { get; set; } |
Kernel of the pitch and energy predictors (3). |
int WindowLength { get; set; } |
The analysis window, in samples (1024). |
int[] ResBlockKernels { get; set; } |
HiFi-GAN’s residual-block kernels (3, 7, 11). |
int[] UpsampleKernels { get; set; } |
HiFi-GAN’s upsampling kernels (16, 16, 4, 4). |
int[] UpsampleRates { get; set; } |
HiFi-GAN’s upsampling factors (8, 8, 2, 2); their product is the hop. |
int[][] ResBlockDilations { get; set; } |
Their dilations ({1, 3, 5} each). |