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 fileAvailable Models
| Model | Speed | Quality | Best for |
|---|---|---|---|
InternalModel.Nmp | ⚡ Fastest | Good | Real-time preview, rapid iteration |
InternalModel.Default | Medium | Very Good | General purpose |
InternalModel.Best | Slow | Excellent | Final quality separation |
InternalModel.Karaoke | Medium | Excellent | Karaoke tracks, preserves vocals |
InternalModel.HTDemucs | Slowest | Highest | Multi-stem (vocals, bass, drums, other) |
SimpleSeparationOptions
| Property | Type | Description |
|---|---|---|
Model | InternalModel | Which ONNX model to use for separation. |
OutputDirectory | string | Directory where output files are written. |
NoiseReduction | bool | Apply 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
| Member | Type | Description |
|---|---|---|
chords | List<TimedChord> | List of chords with timestamps. |
TimedChord.TimeSeconds | double | Timestamp in seconds. |
TimedChord.ChordName | string | Chord name (e.g. "Cmaj", "Am7"). |
key | MusicalKey | Detected musical key. |
bpm | int | Detected tempo in BPM. |
stability | float | Real-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
| Value | Description |
|---|---|
PlaybackSystem.Club | Optimized for nightclub / dance floor sound systems |
PlaybackSystem.Car | Optimized for in-car audio systems |
PlaybackSystem.Studio | Neutral studio monitor reference |
PlaybackSystem.HomeTheater | Home theater speaker systems |