AudioSeparator.Abstractions 0.2.0-beta.2

This is a prerelease version of AudioSeparator.Abstractions.
dotnet add package AudioSeparator.Abstractions --version 0.2.0-beta.2
                    
NuGet\Install-Package AudioSeparator.Abstractions -Version 0.2.0-beta.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AudioSeparator.Abstractions" Version="0.2.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AudioSeparator.Abstractions" Version="0.2.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="AudioSeparator.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AudioSeparator.Abstractions --version 0.2.0-beta.2
                    
#r "nuget: AudioSeparator.Abstractions, 0.2.0-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AudioSeparator.Abstractions@0.2.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AudioSeparator.Abstractions&version=0.2.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AudioSeparator.Abstractions&version=0.2.0-beta.2&prerelease
                    
Install as a Cake Tool

AudioSeparator.Abstractions

Contracts and DTOs for modular audio stem separation — separators, sessions, I/O abstractions, and separation results.

NuGet License: MIT .NET

Part of AudioSeparator — modular .NET audio stem separation.


Install

dotnet add package AudioSeparator.Abstractions

Most applications also reference a backend (e.g. AudioSeparator.Onnx.Demucs) and an I/O package (NAudio or FFMPEG).


When to use this package

  • You are authoring a custom separator backend or I/O plugin and need the shared contracts.
  • You need the result types (SeparationResult, StemAudio) and write extensions without pulling in ONNX or file I/O implementations.
  • You are building benchmark tooling that observes any IAudioSeparator.

You typically do not reference only this package in an end-user app — pair it with a concrete backend and reader/writer.


Core principle

The separator returns separated stems as SeparationResult. It does not write files. Persistence is handled by I/O extensions (WriteToDirectoryAsync) using a registered IAudioWriter.


Quick start

using AudioSeparator.Abstractions;
using AudioSeparator.Abstractions.Audio;

// After separation (from any IAudioSeparator implementation):
SeparationResult result = await session.RunAsync();

// Write stems when a writer was registered at build time:
await result.WriteToDirectoryAsync("./Outputs");

// Or write a single stem with an explicit writer:
await result.Stems["vocals"].WriteToFileAsync("./vocals.wav", writer);

Session flow

Step Action Output
1 CreateSession(inputPath) Probe + validation
2 Attach progress on session.Tasks UI feedback
3 RunAsync() SeparationResult
4 WriteToDirectoryAsync(directory) Files on disk

Key API

Type Role
IAudioSeparator Factory for separation sessions
ISeparationSession Runs the pipeline; exposes Tasks for progress
IAudioSeparatorContext Runtime context shared across tasks
IAudioSeparatorBuilder<TBuilder> Fluent builder: UseAudio, UseStemNames, WithRequirements
IAudioReader Probe and read input audio (ProbeAsync, ReadAsync)
IAudioWriter Write a StemAudio to disk
AudioSourceInfo Probe result (sample rate, channels, duration)
AudioChunk Chunk of float samples from the reader
SeparationRequirements Builder config: sample rate, stem names
InferenceSpec ONNX tensor layout (names, dims, stems — no sample rate)
SeparationResult Output: stems dictionary + writer reference
StemAudio One separated stem (samples, sample rate, channels)
IProcessTask Pipeline task with progress callbacks
SeparationResultExtensions WriteToDirectoryAsync
StemAudioExtensions WriteToFileAsync
ISeparationBenchmarkObserver Per-phase benchmark hooks
SeparationBenchmarkOptions Warmup, probe, output directory
SeparationBenchmarkReport Timing, memory, RTF metrics
SeparationBenchmarkPhase Probe, AudioRead, Inference, ResultAssembly, StemWrite

Requirements

  • .NET 10
  • Zero NuGet dependencies — this package is contracts only

Package NuGet Description
AudioSeparator.Core Pipeline implementation Session API and tasks
AudioSeparator.Onnx.Demucs Demucs backend Recommended for end users
AudioSeparator.NAudio NAudio I/O WAV/MP3 read, WAV write
AudioSeparator.FFMPEG FFMPEG I/O Broad format support
AudioSeparator.Benchmark Benchmarking Performance measurement

Source: AudioSeparator.Abstractions on GitHub


License

MIT — see AudioSeparator repository.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on AudioSeparator.Abstractions:

Package Downloads
AudioSeparator.Core

Session API and task pipeline for AudioSeparator — probe, validate, run tasks, and return separated stems without file I/O.

AudioSeparator.NAudio

NAudio reader and writer extensions for AudioSeparator — decode input and save stems as WAV without FFMPEG.

AudioSeparator.FFMPEG

FFMPEG/ffprobe extensions for AudioSeparator — broad format support for reading input and encoding separated stems.

AudioSeparator.Benchmark

Benchmark runners and reporters for AudioSeparator — warmup runs, per-phase timing, memory snapshots, and JSON/console reports.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-beta.2 90 9/13/2026
0.2.0-beta.1 106 9/13/2026
0.2.0-beta 98 8/30/2026
0.1.0-beta 111 8/13/2026