BSRoFormerOptions
Options & Configuration · AiDotNet.Audio.SourceSeparation
Configuration options for the BS-RoFormer (Band-Split Rotary Transformer) model.
Inheritance: ModelOptions → BSRoFormerOptions
For Beginners
BS-RoFormer separates music into individual instruments by dividing audio into frequency bands (like bass, mid, treble on an equalizer), processing each band with AI, then combining the results. The “Rotary” part helps it understand where sounds occur in time, even for long songs.
How It Works
BS-RoFormer (Lu et al., 2023) applies band-split processing with rotary position embeddings to achieve state-of-the-art music source separation. It splits the spectrogram into frequency bands, processes each with Transformers, and fuses results, achieving 12.8 dB SDR on vocals.
Constructors
| Constructor | Summary |
|---|---|
BSRoFormerOptions() |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX Runtime settings used when the model is loaded from an ONNX file. |
bool UseRotaryEmbedding { get; set; } |
Gets or sets whether the paper’s rotary position embedding is used. |
double DropoutRate { get; set; } |
Gets or sets the dropout probability of the native layers during training. |
double LearningRate { get; set; } |
Gets or sets the learning rate of the default optimizer. |
double WeightDecay { get; set; } |
Gets or sets the weight decay of the default optimizer. |
int BandEmbeddingDim { get; set; } |
Gets or sets the band embedding dimension. |
int FeedForwardDim { get; set; } |
Gets or sets the inner width of each feed-forward block. |
int FftSize { get; set; } |
Gets or sets the STFT window length in samples; the model rounds it up to a power of two. |
int HopLength { get; set; } |
Gets or sets the number of samples between successive STFT frames. |
int NumAttentionHeads { get; set; } |
Gets or sets the number of heads in each attention layer. |
int NumBands { get; set; } |
Gets or sets the number of frequency bands to split into. |
int NumFreqBins { get; set; } |
Gets or sets the number of frequency bins per STFT frame (FftSize / 2 + 1). |
int NumStems { get; set; } |
Gets or sets the number of stems the model separates. |
int NumTransformerLayers { get; set; } |
Gets or sets the number of transformer layers. |
int SampleRate { get; set; } |
Gets or sets the sample rate, in Hz, that input audio is expected at. |
int TransformerDim { get; set; } |
Gets or sets the hidden width of the transformer layers. |
string ModelPath { get; set; } |
Gets or sets the path of the pretrained ONNX model. |
string[] Sources { get; set; } |
Gets or sets the names of the separated stems, in output order. |