StableAudioOptions
Options & Configuration · AiDotNet.Audio.StableAudio
Configuration options for Stable Audio generation.
Inheritance: ModelOptions → StableAudioOptions
For Beginners
Stable Audio generates professional-quality audio:
Example prompts:
- “Upbeat electronic dance track with synth leads and heavy bass drop”
- “Peaceful ambient soundscape with soft pads and nature sounds”
- “Epic orchestral trailer music with dramatic brass and percussion”
- “Lo-fi hip hop beat with jazzy piano chords and vinyl crackle”
Tips for good prompts:
- Be specific about genre, instruments, mood, and tempo
- Mention audio characteristics (stereo width, dynamics)
- Include style references when appropriate
How It Works
Stable Audio is Stability AI’s state-of-the-art audio generation model using latent diffusion with a Diffusion Transformer (DiT) architecture. It supports high-quality music and sound effects generation with variable-length output.
Constructors
| Constructor | Summary |
|---|---|
StableAudioOptions() |
Initializes a new instance with default values. |
StableAudioOptions(StableAudioOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX execution options. |
StableAudioModelSize ModelSize { get; set; } |
Gets or sets the model size variant. |
bool Stereo { get; set; } |
Gets or sets whether to generate stereo audio. |
double DropoutRate { get; set; } |
Gets or sets the dropout rate for training. |
double DurationSeconds { get; set; } |
Gets or sets the default duration of generated audio in seconds. |
double GuidanceScale { get; set; } |
Gets or sets the classifier-free guidance scale. |
double MaxDurationSeconds { get; set; } |
Gets or sets the maximum duration in seconds. |
double TimingConditioningScale { get; set; } |
Gets or sets the conditioning scale for timing information. |
int DitHiddenDim { get; set; } |
Gets or sets the DiT hidden dimension. |
int LatentDimension { get; set; } |
Gets or sets the latent dimension. |
int MaxAudioLength { get; set; } |
Gets or sets the maximum audio latent length. |
int MaxTextLength { get; set; } |
Gets or sets the maximum text sequence length. |
int NumAttentionHeads { get; set; } |
Gets or sets the number of attention heads. |
int NumDitBlocks { get; set; } |
Gets or sets the number of DiT blocks. |
int NumInferenceSteps { get; set; } |
Gets or sets the number of diffusion steps. |
int SampleRate { get; set; } |
Gets or sets the output sample rate in Hz. |
int TextEmbeddingDim { get; set; } |
Gets or sets the T5 embedding dimension. |
string DitPath { get; set; } |
Gets or sets the path to the DiT denoiser ONNX model. |
string TextEncoderPath { get; set; } |
Gets or sets the path to the T5 text encoder ONNX model. |
string VaePath { get; set; } |
Gets or sets the path to the VAE ONNX model. |