OrpheusTTSOptions

Options & Configuration · AiDotNet.TextToSpeech.CodecBased

Options for OrpheusTTS.

Inheritance: ModelOptions → TtsModelOptions → OrpheusTTSOptions

For Beginners

These settings size Orpheus’s language model and its audio codec, and control how it picks each next sound token; the defaults reproduce the released 3B model.

How It Works

Orpheus has no paper: the defaults are canopyai/Orpheus-TTS (release 0.1, the orpheus_tts package, the fine-tuning script and the data-preparation notebook it links) and canopylabs/orpheus-3b-0.1-ft’s config.json: Llama 3.2 3B (width 3072, 28 layers, 24 heads over 8 key-value heads of 128, SwiGLU 8192, rotary θ 500000 with Llama 3 scaling ×32, tied embeddings) over Llama 3’s tokenizer plus 28,683 audio tokens (156,940 in all), speaking SNAC 24 kHz codes (hubertsiuzdak/snac_24khz: three codebooks of 4096 at 12, 23 and 47 Hz, seven tokens a frame). Generation follows the package: the prompt “{voice}: {text}” with the voice “tara”, temperature 0.6, top-p 0.8, a repetition penalty of 1.3 and at most 1200 new tokens. Fine-tuning follows finetune/train.py: Hugging Face’s Trainer at 5e-5 (AdamW, betas 0.9 and 0.999, eps 1e-8, no weight decay, linear decay without warm-up, gradient norm clipped to 1), the loss on every token.

Constructors

Constructor Summary
OrpheusTTSOptions() Creates the orpheus-3b-0.1-ft configuration.
OrpheusTTSOptions(OrpheusTTSOptions other) Copies another instance.

Properties

Property Summary
OrpheusDecoding Decoding { get; set; } How the codes become audio (Full).
bool CodecDepthwise { get; set; } Whether SNAC’s residual convolutions are depthwise (true).
bool CodecNoise { get; set; } Whether SNAC’s decoder blocks add noise (true).
bool ConstrainToAudioTokens { get; set; } Whether each sampled token is restricted to the codes of the slot it fills, and the end of speech to frame boundaries (false).
bool RemoveDuplicateFrames { get; set; } Whether training drops each frame whose coarse code repeats the previous kept frame’s, as the release’s data preparation does (true).
double Beta1 { get; set; } AdamW β1 (0.9).
double Beta2 { get; set; } AdamW β2 (0.999).
double Epsilon { get; set; } AdamW ε (1e-8).
double MaxGradNorm { get; set; } The gradient norm clip (1.0; 0 for none).
double RepetitionPenalty { get; set; } The repetition penalty over every token of the prompt and the output (1.3; the release requires at least 1.1).
double RmsEpsilon { get; set; } RMSNorm epsilon (1e-5).
double RopeHighFrequencyFactor { get; set; } Llama 3 rotary scaling’s high-frequency factor (4).
double RopeLowFrequencyFactor { get; set; } Llama 3 rotary scaling’s low-frequency factor (1).
double RopeScalingFactor { get; set; } Llama 3 rotary scaling factor (32; 0 for none).
double RopeTheta { get; set; } Rotary base θ (500000).
double Temperature { get; set; } Sampling temperature (0.6); 0 picks the most likely token.
double TopP { get; set; } Nucleus sampling’s probability mass (0.8).
int CodecCodebookDim { get; set; } SNAC’s factorized code width (8).
int CodecDecoderDim { get; set; } SNAC’s first decoder width (1024).
int CodecEncoderDim { get; set; } SNAC’s first encoder width (48).
int HeadDim { get; set; } Width of each head (128).
int Heads { get; set; } Attention heads (24).
int Intermediate { get; set; } SwiGLU hidden width (8192).
int KeyValueHeads { get; set; } Key-value heads shared by groups of query heads (8).
int Layers { get; set; } Decoder layers (28).
int MaxNewTokens { get; set; } The most tokens generated after the prompt (1200: about 14 seconds).
int NumDecoderLayers { get; set; } Causal decoder depth, the native Llama Layers setting.
int NumHeads { get; set; } Query attention heads, the native Llama Heads setting.
int RopeOriginalMaxPositions { get; set; } Llama 3 rotary scaling’s original context (8192).
int SamplingSeed { get; set; } The seed of generation’s sampling and the codec’s decoder noise (0).
int TrainingSteps { get; set; } Training steps over which the learning rate decays linearly to 0 (0: a constant rate).
int[] CodecDecoderRates { get; set; } SNAC’s decoder rates (8, 8, 4, 2).
int[] CodecEncoderRates { get; set; } SNAC’s encoder strides (2, 4, 8, 8).
string Voice { get; set; } The voice named before the text (“tara”; the fine-tuned release also knows leah, jess, leo, dan, mia, zac and zoe), or null for the text alone (the pretrained model, or a single-speaker fine-tune).