Class AudioGenOptions
Configuration options for audio generation models.
public class AudioGenOptions
- Inheritance
-
AudioGenOptions
- Inherited Members
Remarks
AudioGen models generate audio from text descriptions using a language model approach with discrete audio codes (like EnCodec).
For Beginners: AudioGen works differently from TTS: - TTS: Converts specific text to spoken words - AudioGen: Creates sounds/music matching a description
Example prompts:
- "A dog barking in the distance"
- "Gentle piano music with rain sounds"
- "Crowd cheering at a sports event"
Properties
AudioCodecPath
Gets or sets the path to the audio codec (decoder) model.
public string? AudioCodecPath { get; set; }
Property Value
Channels
Gets or sets the number of audio channels (1=mono, 2=stereo).
public int Channels { get; set; }
Property Value
DurationSeconds
Gets or sets the duration of generated audio in seconds.
public double DurationSeconds { get; set; }
Property Value
GuidanceScale
Gets or sets the classifier-free guidance scale. Higher values = stronger prompt following.
public double GuidanceScale { get; set; }
Property Value
LanguageModelPath
Gets or sets the path to the language model.
public string? LanguageModelPath { get; set; }
Property Value
MaxDurationSeconds
Gets or sets the maximum duration in seconds.
public double MaxDurationSeconds { get; set; }
Property Value
ModelSize
Gets or sets the model size to use.
public AudioGenModelSize ModelSize { get; set; }
Property Value
OnnxOptions
Gets or sets the ONNX execution options.
public OnnxModelOptions OnnxOptions { get; set; }
Property Value
SampleRate
Gets or sets the output sample rate.
public int SampleRate { get; set; }
Property Value
Seed
Gets or sets the random seed for reproducibility. Null for random generation.
public int? Seed { get; set; }
Property Value
- int?
Temperature
Gets or sets the temperature for sampling. Higher values = more random, lower = more deterministic.
public double Temperature { get; set; }
Property Value
TextEncoderPath
Gets or sets the path to the text encoder model.
public string? TextEncoderPath { get; set; }
Property Value
TopK
Gets or sets the top-k value for sampling. Only the top k tokens are considered.
public int TopK { get; set; }
Property Value
TopP
Gets or sets the top-p (nucleus) value for sampling.
public double TopP { get; set; }