Minimal, high-level C# audio API for device enumeration, master volume, capture (mic/loopback), and playback. Powered by NAudio.
$ dotnet add package AudioApiA lightweight .NET library to simplify working with audio devices, playback, and recording.
It wraps common audio operations into an easy-to-use API without requiring deep knowledge of low-level Windows APIs.
Install via NuGet:
dotnet add package AudioApi
Or via the Package Manager Console:
Install-Package AudioApi
using AudioApi;
var devices = AudioManager.GetOutputDevices();
foreach (var device in devices)
{
Console.WriteLine($"{device.Id}: {device.Name}");
}
Console.ReadKey();
using AudioApi;
var player = new AudioPlayer();
player.Play("test.mp3");
Console.WriteLine("Playing... press any key to stop");
Console.ReadKey();
player.Stop();
using AudioApi;
var recorder = new AudioRecorder();
recorder.Start("recorded.wav");
Console.WriteLine("Recording... press any key to stop");
Console.ReadKey();
recorder.Stop();
Contributions, issues, and feature requests are welcome! Feel free to open a PR or issue on GitHub.
MIT License © 2025 Ben