HTDemucs<T>

Models & Types · AiDotNet.Audio.SourceSeparation

HTDemucs (Hybrid Transformer Demucs) for music source separation.

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

Implements: IMusicSourceSeparator<T>

For Beginners

HTDemucs is Meta’s best music separator. It processes audio in two ways at once: as raw sound waves and as a frequency picture (spectrogram). A Transformer helps both paths share information, getting the best of both worlds.

Usage:

How It Works

HTDemucs (Rouard et al., ICASSP 2023) is Meta’s hybrid architecture combining a temporal convolutional encoder with cross-domain Transformer attention, operating on both waveform and spectrogram simultaneously. Achieves 9.0 dB SDR on MUSDB18-HQ.

Constructors

Constructor Summary
HTDemucs(NeuralNetworkArchitecture<T> architecture, HTDemucsOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer)
HTDemucs(NeuralNetworkArchitecture<T> architecture, string modelPath, HTDemucsOptions 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)