Merge audio

How to merge audio files in C#

GroupDocs.Merger facilitates developers to combine multiple audio files according to their preferred sequence and save them as a single audio file. This eliminates the need for manual operations with desktop software, saving you valuable time. Currently, GroupDocs.Merger allows combining audio files having the same extensions. For example, WAV file with other WAV files, or MP3 file with other MP3 files.

Here’s a C# code snippet demonstrating how to concatenate audio files:

  • Create an instance of the Merger class and pass the source audio file path as a constructor parameter. You may specify absolute or relative file paths as per your requirements.
  • Add another audio file to merge with the Join method. Audio file should be of the same format as the initial one. Repeat this step for other audio files you want to merge.
  • Call the Save method and specify the filename for the resulting audio file as a parameter.
// Load the source WAV file
using (var merger = new GroupDocs.Merger.Merger(@"c:\sample1.wav"))
    // Add another WAV file to merge
    // Merge audio files and save result

Merging Different Audio File Formats

This section describes how to combine miscellaneous audio file formats using GroupDocs.Merger API. Please look at the articles listed below:

Code Examples

Please visit Showcases to learn and try our free backend and frontend examples and use-cases!

Live Demos

GroupDocs.Merger for .NET offers the following free online tools to test its quality and accuracy: