AI Features

AI-powered audio processing. Available in OwnAudioSharp only — not in the Basic package.

⚠️

These features require the full OwnAudioSharp NuGet package (~290 MB) which includes the ONNX neural network model files. They are not available in OwnAudioSharp.Basic.

Vocal Remover

Separates vocals from instrumental using ONNX neural network models. Namespace: OwnaudioNET.Features.Vocalremover

C#
using OwnaudioNET.Features.Vocalremover;

var options = new SimpleSeparationOptions
{
    Model           = InternalModel.Best,   // see model table below
    OutputDirectory = "output/",
    NoiseReduction  = true
};

using var separator = new SimpleAudioSeparationService(options);
separator.Initialize();

var result = separator.Separate("song.mp3");

Console.WriteLine(result.VocalsPath);       // path to vocals-only file
Console.WriteLine(result.InstrumentalPath); // path to instrumental-only file

Available Models

ModelSpeedQualityBest for
InternalModel.Nmp⚡ FastestGoodReal-time preview, rapid iteration
InternalModel.DefaultMediumVery GoodGeneral purpose
InternalModel.BestSlowExcellentFinal quality separation
InternalModel.KaraokeMediumExcellentKaraoke tracks, preserves vocals
InternalModel.HTDemucsSlowestHighestMulti-stem (vocals, bass, drums, other)

SimpleSeparationOptions

PropertyTypeDescription
ModelInternalModelWhich ONNX model to use for separation.
OutputDirectorystringDirectory where output files are written.
NoiseReductionboolApply post-processing noise reduction.

Chord Detection

Detects musical chords, key, and tempo from audio files. Namespace: OwnaudioNET.Features

C# — From a file
var (chords, key, bpm) = ChordDetect.DetectFromFile("song.mp3", intervalSecond: 1.0f);

foreach (var chord in chords)
    Console.WriteLine($"{chord.TimeSeconds:F1}s  {chord.ChordName}");

Console.WriteLine($"Key: {key}  BPM: {bpm}");
C# — From multiple files (mixed)
// Mixes all files before analysis
var (chords, key, bpm) = ChordDetect.DetectFromFiles(
    new[] { "guitar.wav", "piano.wav" },
    intervalSecond: 0.5f);
C# — Real-time detection
// Continuous detection from an active note stream
var (chord, stability) = ChordDetect.DetectRealtime(
    notes,                   // List<Note>
    DetectionMode.Standard,
    bufferSize: 4096);

Console.WriteLine($"Chord: {chord}  Stability: {stability:P0}");

Return Types

MemberTypeDescription
chordsList<TimedChord>List of chords with timestamps.
TimedChord.TimeSecondsdoubleTimestamp in seconds.
TimedChord.ChordNamestringChord name (e.g. "Cmaj", "Am7").
keyMusicalKeyDetected musical key.
bpmintDetected tempo in BPM.
stabilityfloatReal-time detection confidence (0.0–1.0).

Auto-Mastering (Matchering)

AI-driven EQ matching and automated audio mastering. Namespace: OwnaudioNET.Features

C# — Analyze spectrum
AudioSpectrum spectrum = AudioAnalyzer.AnalyzeAudioFile("track.wav");
C# — EQ match to reference
AudioAnalyzer.ProcessEQMatching(
    sourceFile: "my-mix.wav",
    targetFile: "reference.wav",   // the "sound" to match
    outputFile: "mastered.wav");
C# — Apply playback system preset
AudioAnalyzer.ProcessWithEnhancedPreset(
    sourceFile: "my-mix.wav",
    outputFile: "for-club.wav",
    system:     PlaybackSystem.Club,  // Club, Car, Studio, HomeTheater
    eqOnlyMode: true);
C# — Batch process
AudioAnalyzer.BatchProcessWithEnhancedPreset(
    sourceFiles:    new[] { "track1.wav", "track2.wav", "track3.wav" },
    baseSampleFile: "reference.wav",
    outputDirectory: "output/",
    system:         PlaybackSystem.Studio,
    fileNameSuffix: "_mastered");

PlaybackSystem Values

ValueDescription
PlaybackSystem.ClubOptimized for nightclub / dance floor sound systems
PlaybackSystem.CarOptimized for in-car audio systems
PlaybackSystem.StudioNeutral studio monitor reference
PlaybackSystem.HomeTheaterHome theater speaker systems