UniAudioOptions
Options & Configuration · AiDotNet.TextToSpeech.CodecBased
Options for UniAudio’s universal codec and multi-scale Transformer.
Inheritance: ModelOptions → TtsModelOptions → CodecTtsOptions → UniAudioOptions
How It Works
Defaults follow Yang et al. 2024, Tables 8 and 18: three 1024-way RVQ codes at 50 Hz, a 24-layer global
and 8-layer local causal Transformer with 12 heads, top-30 sampling at temperature 0.8, and a three-second
speaker prompt. OfficialV1 selects the different axes in the released checkpoint’s config.yaml.
Constructors
| Constructor | Summary |
|---|---|
UniAudioOptions() |
Creates the paper configuration. |
UniAudioOptions(UniAudioOptions other) |
Initializes an independent copy of another UniAudio configuration. |
Properties
| Property | Summary |
|---|---|
UniAudioCodecTrainingOptions CodecTraining { get; set; } |
The universal codec’s reconstruction, discriminator and optimizer recipe. |
UniAudioTrainingComponent TrainingComponent { get; set; } |
Trains the language model or independently pretrains the universal codec. |
bool IncludeCodecDiscriminators { get; set; } |
Retains the codec critics when reconstructing a model after switching back to LM training. |
bool PrefixLanguageModel { get; set; } |
Allows bidirectional condition attention when enabled. |
bool UseReleasedTextFrontend { get; set; } |
Uses the released Kaldi lexicon and alignment-phone inventory for raw text. |
double CodecCodebookDecay { get; set; } |
Gets or sets the codec codebook EMA decay (0.99). |
double MaximumLengthRatio { get; set; } |
Gets or sets the release inference maximum-length ratio (7). |
double MinimumLengthRatio { get; set; } |
Gets or sets the release inference minimum-length ratio (0.5). |
double PromptSeconds { get; set; } |
Gets or sets the speaker-prompt duration (three seconds). |
double Temperature { get; set; } |
Gets or sets sampling temperature (0.8). |
int AudioEndToken { get; set; } |
Gets or sets the released audio-end token id. |
int AudioPromptEndToken { get; set; } |
Gets or sets the released audio-prompt-end token id. |
int AudioPromptStartToken { get; set; } |
Gets or sets the released audio-prompt-start token id. |
int AudioStartToken { get; set; } |
Gets or sets the released audio-start token id. |
int AudioTokenOffset { get; set; } |
Gets or sets the first joint-vocabulary id assigned to codec tokens. |
int CodecDeadCodeThreshold { get; set; } |
Gets or sets the EMA dead-code threshold (2). |
int CodecDimension { get; set; } |
Gets or sets the universal codec latent width (128). |
int CodecFilters { get; set; } |
Gets or sets the universal codec’s base SEANet width (32). |
int CodecFrameRate { get; set; } |
Gets the native codec’s frames per second; setting it configures the hop and codec strides. |
int CodecKMeansIterations { get; set; } |
Gets or sets first-batch k-means iterations for a newly trained codec (50). |
int CodecTotalQuantizers { get; set; } |
Gets or sets the codec’s trained RVQ stages (12 at 6 kbps; inference selects the first three). |
int ContinuousToken { get; set; } |
Gets or sets the released continuous-placeholder token id. |
int EndToken { get; set; } |
Gets or sets the released sequence-end token id. |
int GlobalFeedForwardDim { get; set; } |
Gets or sets the global Transformer’s feed-forward width (6,144). |
int GlobalStartToken { get; set; } |
Gets or sets the released global-transformer start token id. |
int HopSize { get; set; } |
Gets the product of the native codec strides. |
int JointVocabularySize { get; set; } |
Gets or sets the paper’s joint vocabulary size (4,212, including special tokens). |
int LocalFeedForwardDim { get; set; } |
Gets or sets the local Transformer’s feed-forward width (6,144). |
int LocalStartToken { get; set; } |
Gets or sets the released local-transformer start token id. |
int MaxContextPatches { get; set; } |
Gets or sets the global context limit in three-token patches (3,000). |
int MaximumGeneratedFrames { get; set; } |
Gets or sets a hard cap on newly generated audio frames. |
int MinimumGeneratedFrames { get; set; } |
Gets or sets the minimum number of newly generated audio frames. |
int PadToken { get; set; } |
Gets or sets the released padding token id. |
int PhoneEndToken { get; set; } |
Gets or sets the released phoneme-end token id. |
int PhoneStartToken { get; set; } |
Gets or sets the released phoneme-start token id. |
int PhoneTokenOffset { get; set; } |
Gets or sets the first joint-vocabulary id assigned to phonemes. |
int PhoneVocabularySize { get; set; } |
Gets or sets the reserved phoneme vocabulary (the release reserves 500 entries). |
int SamplingSeed { get; set; } |
Gets or sets deterministic sampling’s seed. |
int StartToken { get; set; } |
Gets or sets the released sequence-start token id. |
int TopK { get; set; } |
Gets or sets top-k sampling’s candidate count (30). |
int TtsTaskToken { get; set; } |
Gets or sets the released TTS-task token id. |
int[] CodecRatios { get; set; } |
Gets or sets the decoder-order codec strides (8, 5, 4, 2). |
Methods
| Method | Summary |
|---|---|
UniAudioOptions OfficialV1() |
The original ep5-iter340000 checkpoint and universal codec configuration. |