Free.NET Library for Manipulating Audio File Formats
Play, Reocord, Encode, Read & Convert Audio files via .NET API.
NAudio is an open source API to manipulate audio files programmatically. The API allows the .NET Developer to read audio from different standards, playback audio, convert audio formats, record system audio, and more. The API intends to provide a comprehensive set of useful utility classes by which you can construct your own audio manipulation application.
Using the API, you can playback audio using Waveout, DirectSound, ASIO & WASAPI and can read audio from WAV, AIFF, MP3, G.711, ADPCM, WMA, AAC, MP4, and more. The API allows encoding audio using an ACM codec installed on your machine, you can mix and manipulate audio streams using a 32-bit mixing engine.
At A Glance
An overview of NAudio features.
- Play Audio
- Read Audio
- Convert Audio
- Modify Bit Depth
- Encode Audio
- Create WMA
- Create AAC/MP4 Audio
- Support for UWP
- Work with soundcards
NAudio supports popular Audio file formats listed below.
NAudio work with .NET Core App 3.0, .NET Framework 3.5, .NETStandard 2.0 & UAP 10.0.
Getting Started with NAudio
The best way to install NAudio is via NuGet you can run the following command and install NAudio in you application.
Install NAudio from NuGet
Play Audio File using Free C# API
NAudio allows .NET programmers to play audio files from their own .NET applications. In order to play an audio file, first, you need to open the file using AudioFileHeaer. After your file is successfully opened you can use WaveOutEvent as an output device to play audio. You can simply play audio by passing AudioFile to outPutDevice with Init method and call Play() method.
Free C# API to Convert MP3 to WAV file
The API allows the developers to convert MP3 files to other file formats. The developers can add an MP4 conversion feature in their own application if the ACM MP3 codec is present in the application machine. This codec is usually pre-installed in most versions of Windows. Converting MP3 to WAV is pretty simple you just need to open an MP3 file using MP4FileReader and convert it using WaveFileWriter.CreateWaveFile() method.
Concatinate Multiple Audio Files via C#
The API allows the developers to concatenate multiple audio files into a single audio file. The concatenation process is pretty simple. You can load your multiple audio files using AudioFileReader() method and concatinate them using ConcatenatingSampleProvider() method.