BACKGROUND
I have a program that is generating two WAV files. Each WAV file represents one (1) side of a two-person conversation. I want to combine the two WAV files into one file for playback such that the two sides of the converations are interleaved (vs appending one WAV file to the other). I will be using VB.NET to program this task.
QUESTION(s)
I know that I can open each WAV file parse out the information in the headers and merge/interleave the samples but I was hoping there was a (free) software package / API out there that can accomplish the same thing... does Audacity have an API that I can call the perform this interleaving operation? If not, do you have any suggestions on how to approach this task?
Thanks for your attention to my question,
celoftis
Merge/Interleave two WAV files...
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Merge/Interleave two WAV files...
Obviously Audacity can mix audio files together, but you should be aware that it is under the General Public License (GPL). So if you want to use Audacity in your application then you either have to make your entire program GPL (distribute its source code so that others can use it), or distribute the code that uses Audacity as a separate component with its own licensing agreement. Also be aware that Audacity is written in C++. You could take a look at /src/Mix.cpp in the code.
If you want a definitive answer beyond that, it would probably be best to subscribe to the developers' mailing list and ask there directly. Please be aware we are very busy preparing a release at the moment.
Gale
If you want a definitive answer beyond that, it would probably be best to subscribe to the developers' mailing list and ask there directly. Please be aware we are very busy preparing a release at the moment.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Merge/Interleave two WAV files...
See http://sox.sourceforge.net/, i.e. libsox, also the sox "-m" option and the "mixer" effect.celoftis: ... do you have any suggestions on how to approach this task?
Re: Merge/Interleave two WAV files...
Great that is exactly the approach I ended up taking. Here are the options that I used:edgar-rft wrote:See http://sox.sourceforge.net/, i.e. libsox, also the sox "-m" option and the "mixer" effect.
sox.exe --multi-threaded --combine mix file1.wav file2.wav combined.wav --norm gain -e