ForwardTacotronOptions

Options & Configuration · AiDotNet.TextToSpeech.Classic

Options for ForwardTacotron (non-autoregressive Tacotron with duration, pitch and energy predictors).

Inheritance: ModelOptions → ForwardTacotronOptions

For Beginners

These options configure the ForwardTacotron model. Default values follow the reference implementation.

How It Works

Defaults are the reference implementation’s single-speaker configuration (as-ideas/ForwardTacotron, configs/singlespeaker.yaml): 22.05 kHz audio, 1024-point STFT, hop 256, 80 mel bins; embedding 256; series predictors with a 64-wide embedding, 256-channel convolutions, dropout 0.5 and bidirectional GRUs of 64 (duration), 128 (pitch) and 64 (energy); a CBHG pre-net (K = 16, 256 channels, 4 highways, dropout 0.5); a 512-unit bidirectional LSTM; a CBHG post-net (K = 8, 256 channels, 4 highways, no dropout); pitch and energy strength 1; variance loss factor 0.1; Adam with the progressive schedule 5e-5 for 150k steps then 1e-5; gradient norm clip 1; voiced pitch kept within 30–600 Hz.

Constructors

Constructor Summary
ForwardTacotronOptions() Creates the reference single-speaker configuration.
ForwardTacotronOptions(ForwardTacotronOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets ONNX runtime settings.
double DurationDropout { get; set; } Gets or sets the duration predictor’s dropout (0.5).
double DurationScale { get; set; } Gets or sets the speaking-rate factor applied to predicted durations (1; the reference’s alpha divides the prediction, so 1/alpha here).
double EnergyDropout { get; set; } Gets or sets the energy predictor’s dropout (0.5).
double EnergyMean { get; set; } Gets or sets the training set’s mean nonzero phoneme energy (0 leaves it as is).
double EnergyStd { get; set; } Gets or sets the training set’s standard deviation of nonzero phoneme energy (1 leaves it as is).
double EnergyStrength { get; set; } Gets or sets the energy conditioning strength (1; 0 disables it).
double GradientClipNorm { get; set; } Gets or sets the gradient norm clip (1).
double LearningRate { get; set; } Gets or sets the first stage’s Adam learning rate.
double PitchDropout { get; set; } Gets or sets the pitch predictor’s dropout (0.5).
double PitchMaxHz { get; set; } Gets or sets the highest voiced F0 counted in a phoneme’s pitch (600 Hz).
double PitchMean { get; set; } Gets or sets the training set’s mean nonzero phoneme pitch, used to normalize pitch (0 leaves it as is).
double PitchMinHz { get; set; } Gets or sets the lowest voiced F0 counted in a phoneme’s pitch (30 Hz).
double PitchStd { get; set; } Gets or sets the training set’s standard deviation of nonzero phoneme pitch (1 leaves it as is).
double PitchStrength { get; set; } Gets or sets the pitch conditioning strength (1; 0 disables it).
double PostnetDropout { get; set; } Gets or sets the CBHG post-net’s dropout (0).
double PrenetDropout { get; set; } Gets or sets the CBHG pre-net’s dropout (0.5).
double SecondStageLearningRate { get; set; } Gets or sets the learning rate of the second schedule stage (1e-5).
double VarianceLossFactor { get; set; } Gets or sets the weight of the duration, pitch and energy losses (0.1 each).
int DurationConvDim { get; set; } Gets or sets the duration predictor’s convolution channels (256).
int DurationRnnDim { get; set; } Gets or sets the duration predictor’s GRU width (64).
int EmbeddingDim { get; set; } Gets or sets the phoneme embedding width (256).
int EnergyConvDim { get; set; } Gets or sets the energy predictor’s convolution channels (256).
int EnergyRnnDim { get; set; } Gets or sets the energy predictor’s GRU width (64).
int FftSize { get; set; } Gets or sets the FFT size.
int HopSize { get; set; } Gets or sets the mel hop size in samples.
int MaxTextLength { get; set; } Gets or sets the input text limit.
int MelChannels { get; set; } Gets or sets the number of mel frequency channels.
int PitchConvDim { get; set; } Gets or sets the pitch predictor’s convolution channels (256).
int PitchRnnDim { get; set; } Gets or sets the pitch predictor’s GRU width (128).
int PostnetBankSize { get; set; } Gets or sets the CBHG post-net’s bank size K (8).
int PostnetChannels { get; set; } Gets or sets the CBHG post-net’s channels (256).
int PrenetBankSize { get; set; } Gets or sets the CBHG pre-net’s bank size K (16).
int PrenetDim { get; set; } Gets or sets the CBHG pre-net’s channels (256).
int RnnDim { get; set; } Gets or sets the bidirectional LSTM’s width per direction (512).
int SampleRate { get; set; } Gets or sets the audio sample rate in Hz.
int SecondStageStartStep { get; set; } Gets or sets the step at which the second schedule stage begins (150,000).
int SeriesEmbeddingDim { get; set; } Gets or sets the series predictors’ embedding width (64).
int VocabSize { get; set; } Gets or sets the text embedding’s vocabulary size.
string ModelPath { get; set; } Gets or sets the exported ONNX graph’s path.