Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combining two audio files in C#

Tags:

c#

c#-4.0

audio

There are 2 audio ( mp3 or wav) files. The first file has the voice of me, the second one has the voice of my friend. Each of them has 10 seconds duration. I want to combine them to get one file that also should have 10 seconds duration.

What are the tools or utilities I should use to solve this issue?

UPDATE: I used lame.exe, but it concatenated them and created the file of 20 seconds duration.

like image 453
Alexandre Avatar asked Apr 16 '12 07:04

Alexandre


People also ask

How do I combine audio files on my computer?

To start mixing audio files, click File on the top and select Import > Audio. Choose the MP3 files to combine mp3 files windows 10. A new waveform window will open each song to get merge together. You will see the audio files in separate tracks in Windows.


2 Answers

This might do the trick.

My WAVFile class supports 8- and 16-bit audio, mono or stereo. One of its special features is a method that will mix WAV audio files together, so that the audio from each source WAV file will be heard simultaneously.

Note: In the above paragraph, My refers to the author of the class, not to myself.

like image 99
npinti Avatar answered Nov 03 '22 15:11

npinti


Check out NAudio tutorial: Mixing multiple wave files together in real time.

like image 25
BluesRockAddict Avatar answered Nov 03 '22 14:11

BluesRockAddict