PortaSpeechOptions
Options & Configuration · AiDotNet.TextToSpeech.Classic
Options for PortaSpeech (Ren et al. 2021): a mixture-alignment linguistic encoder, a VAE variational generator with a flow prior, and a flow post-net with grouped parameter sharing.
Inheritance: ModelOptions → TtsModelOptions → AcousticModelOptions → PortaSpeechOptions
For Beginners
These options configure the PortaSpeech model. Default values follow the original paper settings.
How It Works
Defaults are PortaSpeech (normal), Table 6, with values the paper leaves to its reference implementation
(NATSpeech, egs/egs_bases/tts/{fs,ps,ps_flow}.yaml): linguistic encoder width 192, 4 phoneme and 4 word
relative-position layers (2 heads, window 4, kernel 5, filter 768, dropout 0); duration predictor kernel 5, dropout
0.2, input gradient scale 0.1; variational generator 192 channels, latent 16, kernel 5, 8 encoder and 4 decoder
WaveNet layers, stride 4; VP-flow prior of 4 steps × 4 layers, 64 channels, kernel 3; post-net of 12 Glow steps,
3 WaveNet layers, kernel 3, 192 channels, sharing in groups of 4 (3 groups), temperature 0.8; KL counted after
10 000 updates; post-net learning rate 1e-3; gradient-norm clip 1; frames a multiple of 4; 22.05 kHz, 1024-point
STFT, hop 256, 80 mel bins.
Constructors
| Constructor | Summary |
|---|---|
PortaSpeechOptions() |
Creates PortaSpeech (normal). |
PortaSpeechOptions(PortaSpeechOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double DurationPredictorDropout { get; set; } |
Gets or sets the duration predictor’s dropout (0.2). |
double DurationPredictorGradientScale { get; set; } |
Gets or sets the scale on the gradient the duration loss sends into the encoder (0.1). |
double DurationScale { get; set; } |
Gets or sets the multiplier on predicted word durations at inference (1). |
double GradientClipNorm { get; set; } |
Gets or sets the global gradient-norm clip (1). |
double PostNetLearningRate { get; set; } |
Gets or sets the post-net phase’s learning rate (1e-3). |
double PostNetTemperature { get; set; } |
Gets or sets the post-net’s sampling temperature (0.8). |
int AttentionHeads { get; set; } |
Gets or sets the word-to-phoneme attention heads (2). |
int DecoderDim { get; set; } |
Gets or sets the variational generator’s encoder and decoder hidden channels. |
int DurationPredictorKernelSize { get; set; } |
Gets or sets the duration predictor’s kernel (5). |
int EncoderDim { get; set; } |
Gets or sets the linguistic encoder width through the native shared hidden size. |
int EncoderKernelSize { get; set; } |
Gets or sets the encoders’ feed-forward kernel (5). |
int FilterChannels { get; set; } |
Gets or sets the encoders’ feed-forward filter (768). |
int FramesMultiple { get; set; } |
Gets or sets the frame-count multiple (4, the generator stride). |
int GeneratorChannels { get; set; } |
Gets or sets the variational generator’s channels (192). |
int GeneratorDecoderLayers { get; set; } |
Gets or sets the variational generator’s decoder WaveNet layers (4). |
int GeneratorEncoderLayers { get; set; } |
Gets or sets the variational generator’s encoder WaveNet layers (8). |
int GeneratorKernelSize { get; set; } |
Gets or sets the variational generator’s WaveNet kernel (5). |
int GeneratorStride { get; set; } |
Gets or sets the variational generator’s time stride (4). |
int KlStartUpdates { get; set; } |
Gets or sets the generator updates before the KL term is optimized (10 000). |
int NumDecoderLayers { get; set; } |
Gets or sets the actual VAE decoder’s WaveNet layer count. |
int NumFlowLayers { get; set; } |
Gets or sets the post-net’s flow steps (12). |
int NumWordEncoderLayers { get; set; } |
Gets or sets the word encoder’s layers (4). |
int PostNetChannels { get; set; } |
Gets or sets the post-net’s WaveNet channels (192). |
int PostNetKernelSize { get; set; } |
Gets or sets the post-net’s WaveNet kernel (3). |
int PostNetLayers { get; set; } |
Gets or sets the post-net’s WaveNet layers per step (3). |
int PostNetShareGroupSize { get; set; } |
Gets or sets how many consecutive post-net steps share their WaveNet (4: 12 steps in 3 groups). |
int PrenetKernelSize { get; set; } |
Gets or sets the encoders’ pre-net kernel (5). |
int PrenetLayers { get; set; } |
Gets or sets the encoders’ pre-net convolutions (3). |
int PriorFlowChannels { get; set; } |
Gets or sets the VP-flow prior’s channels (64). |
int PriorFlowKernelSize { get; set; } |
Gets or sets the VP-flow prior’s kernel (3). |
int PriorFlowLayers { get; set; } |
Gets or sets the VP-flow prior’s WaveNet layers per step (4). |
int PriorFlowSteps { get; set; } |
Gets or sets the VP-flow prior’s coupling steps (4). |
int ProsodyDim { get; set; } |
Gets or sets the variational generator’s latent channels (16). |
int RelativeWindow { get; set; } |
Gets or sets the encoders’ maximum relative position (4). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training noise and the inference samples, for repeatable runs. |