MelBandRoFormer<T>

Models & Types · AiDotNet.Audio.SourceSeparation

MelBand-RoFormer for mel-band music source separation.

Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → MelBandRoFormer<T>

Implements: IMusicSourceSeparator<T>

For Beginners

This model separates instruments in a song using mel-scale bands that match how humans hear. It’s like having a smart equalizer that knows which parts belong to vocals, drums, bass, and other instruments.

Usage:

How It Works

MelBand-RoFormer (2024) extends BS-RoFormer by using mel-scale frequency bands instead of linear bands, better matching human perception. Achieves 13.2 dB SDR on vocals (MUSDB18-HQ).

Constructors

Constructor Summary
MelBandRoFormer(NeuralNetworkArchitecture<T> architecture, MelBandRoFormerOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer)
MelBandRoFormer(NeuralNetworkArchitecture<T> architecture, string modelPath, MelBandRoFormerOptions options)

Properties

Property Summary
IReadOnlyList<string> SupportedSources { get; }
int NumStems { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()
SourceSeparationResult<T> Separate(Tensor<T> audio)
Task<SourceSeparationResult<T>> SeparateAsync(Tensor<T> audio, CancellationToken ct)
Tensor<T> ExtractSource(Tensor<T> audio, string source)
Tensor<T> GetSourceMask(Tensor<T> audio, string source)
Tensor<T> Remix(SourceSeparationResult<T> sep, IReadOnlyDictionary<string, double> vols)
Tensor<T> RemoveSource(Tensor<T> audio, string source)