OwnAudioSharp 3.1.0

dotnet add package OwnAudioSharp --version 3.1.0
                    
NuGet\Install-Package OwnAudioSharp -Version 3.1.0
                    
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="OwnAudioSharp" Version="3.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OwnAudioSharp" Version="3.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OwnAudioSharp" />
                    
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 OwnAudioSharp --version 3.1.0
                    
#r "nuget: OwnAudioSharp, 3.1.0"
                    
#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 OwnAudioSharp@3.1.0
                    
#: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=OwnAudioSharp&version=3.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OwnAudioSharp&version=3.1.0
                    
Install as a Cake Tool

OwnAudioSharp

Cross-platform audio library for .NET desktop applications

OwnAudioSharp is a professional-grade audio engine providing high-performance audio playback, recording, and processing for Windows, Linux, and macOS with zero external dependencies.

Key Features

  • Native Audio Engine: Built on PortAudio and MiniAudio for professional-grade, low-latency audio processing across all platforms
  • Multi-format Support: Built-in decoders for MP3, WAV, and FLAC. If FFmpeg 8+ is installed on the system, it is used automatically as the primary decoder, adding support for AAC, OGG, Opus, WMA, AIFF, and virtually any other format — no code changes required.
  • Real-time Processing: Zero-allocation design with lock-free buffers for professional-grade performance
  • Advanced Audio Features:
    • Network Synchronization: Multi-device audio sync across local network (< 5ms accuracy on LAN)
    • Master Clock: Sample-accurate timeline synchronization for multi-track playback
    • SmartMaster Effect: Intelligent audio mastering with auto-calibration
    • AI-powered vocal removal (ONNX-based neural separation)
    • Audio matchering and mastering
    • Real-time chord detection
    • Built-in effects and DSP routines

Quick Start

using OwnaudioNET;
using OwnaudioNET.Features.Vocalremover;

// Initialize the audio engine
OwnaudioNet.Initialize();
OwnaudioNet.Start();

// Create the audio mixer using the underlying engine
var mixer = new AudioMixer(OwnaudioNet.Engine.UnderlyingEngine);
mixer.Start();

// Play an audio file
var music = new FileSource("music.mp3");
mixer.AddSource(music);

// Synchronized Multi-track Playback (Master Clock)
var vocals = new FileSource("vocals.wav");
var backing = new FileSource("backing.mp3");

mixer.AddSource(vocals);
mixer.AddSource(backing);

// Attach sources to the Master Clock for sample-accurate sync
vocals.AttachToClock(mixer.MasterClock);
backing.AttachToClock(mixer.MasterClock);

// Start sources individually
vocals.Play();
backing.Play();

// Network Synchronization - Multi-Device Audio
// Server mode (control device)
await OwnaudioNet.StartNetworkSyncServerAsync(port: 9876);

// Client mode (follower devices)
await OwnaudioNet.StartNetworkSyncClientAsync(
    serverAddress: "192.168.1.100",  // Or null for auto-discovery
    allowOfflinePlayback: true);

// All clients automatically follow server commands
// Perfect for multi-room audio, DJ setups, installations

// AI Vocal Removal
var options = new SimpleSeparationOptions 
{ 
    Model = InternalModel.Best, 
    OutputDirectory = "output" 
};

using var separator = new SimpleAudioSeparationService(options);
separator.Initialize();
var result = separator.Separate("song.mp3");
// result.VocalsPath and result.InstrumentalPath contain the output files

FFmpeg Integration (Optional)

OwnAudioSharp automatically detects FFmpeg dynamic libraries on startup. This is not part of the public API — it happens transparently in the decoder layer.

Decoder priority: FFmpeg → MiniAudio (native) → built-in managed decoder

using Ownaudio.Core;

// Optional: set a custom path before first use (default: empty = system paths)
FFmpegConfig.CustomLibraryPath = @"C:\ffmpeg\bin"; // Windows example

// Check whether FFmpeg was detected successfully
if (FFmpegConfig.IsAvailable)
    Console.WriteLine("FFmpeg decoder active — extended format support enabled.");
else
    Console.WriteLine("FFmpeg not found — using built-in decoders (MP3/WAV/FLAC).");

// No API changes needed — AudioDecoderFactory selects the best decoder automatically
var decoder = AudioDecoderFactory.Create("audio.aac", targetSampleRate: 48000, targetChannels: 2);

Installation per platform:

  • Windows: Place avcodec-62.dll, avformat-62.dll, avutil-60.dll, swresample-6.dll next to the executable, or anywhere on PATH.
  • macOS: brew install ffmpeg
  • Linux: sudo apt install libavcodec-dev libavformat-dev (or equivalent)

Platform Support

  • Windows: Windows 10/11 (x64, ARM64)
  • Linux: Ubuntu, Debian, Fedora, etc. (x64, ARM64)
  • macOS: macOS 10.13+ (x64, ARM64)

Architecture

OwnAudioSharp uses a two-layer architecture:

  1. Engine Layer: Low-level platform-specific audio processing with real-time thread management
  2. API Layer: High-level thread-safe wrappers with lock-free ring buffers to prevent UI blocking

Documentation

License

MIT License - Copyright (c) 2025 ModernMube

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 0 6/13/2026
3.0.14 254 6/4/2026
3.0.13 107 6/2/2026
3.0.11 106 6/1/2026
3.0.10 101 5/31/2026
3.0.7 103 5/26/2026
3.0.5 106 5/22/2026
3.0.4 151 5/17/2026
2.7.1 266 4/8/2026
2.6.8 131 3/25/2026
2.6.1 184 2/28/2026
2.6.0 146 2/16/2026
2.5.5 162 1/28/2026
2.5.4 420 1/11/2026
2.5.3 152 12/31/2025
2.4.1 217 12/21/2025
2.3.4 312 12/15/2025
Loading failed