AudioApi 1.0.6

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

AudioApi 🎵

A 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.

✨ Features

  • List available input and output audio devices
  • Play audio files (e.g., WAV, MP3)
  • Record audio from microphone
  • Control volume and mute state
  • Switch between default devices

📦 Installation

Install via NuGet:

dotnet add package AudioApi

Or via the Package Manager Console:

Install-Package AudioApi

🚀 Usage

List available devices

using AudioApi;

var devices = AudioManager.GetOutputDevices();
foreach (var device in devices)
{
    Console.WriteLine($"{device.Id}: {device.Name}");
}
Console.ReadKey();

Play an audio file

using AudioApi;

var player = new AudioPlayer();
player.Play("test.mp3");

Console.WriteLine("Playing... press any key to stop");
Console.ReadKey();

player.Stop();

Record from microphone

using AudioApi;

var recorder = new AudioRecorder();
recorder.Start("recorded.wav");

Console.WriteLine("Recording... press any key to stop");
Console.ReadKey();

recorder.Stop();

⚙️ Requirements

  • .NET 6.0 or later
  • Windows 10/11 (uses Windows Audio APIs under the hood)

📖 Roadmap

  • Streaming audio from network sources
  • Real-time audio processing (FFT, filters, etc.)
  • Cross-platform support (Linux/Mac via ALSA/CoreAudio)

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open a PR or issue on GitHub.

📜 License

MIT License © 2025 Ben

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.0.6 121 9/10/2025
1.0.4 114 9/10/2025
1.0.3 112 9/10/2025
1.0.2 116 9/9/2025
1.0.1 116 9/9/2025
1.0.0 115 9/8/2025