Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge several audio files using sox

I use this command to merge two audio files into one using sox:

sox end.mp3 -p pad 6 0 | sox - -m start.mp3 output.mp3

I was wondering how can I merge 3 or 4 audio files using only one command instead of using the "output.mp3" as the input to the next command and so on?

I will really appreciate any help

like image 967
Yngwie Pompas Avatar asked Jan 31 '13 19:01

Yngwie Pompas


People also ask

Can you merge audio files?

As a free audio merger, Audacity can help you manage audio files in different formats, such as WAV, AIFF, MP2, MP3, FLAC and OGG. It lets you easily merge multiple audio files together to make a long recording or song.

How do I merge audio recordings in Windows?

Go to "Tracks" > "Mix" and select "Mix and Render" to combine these tracks into one track. Now you get the merged audio files in one track. Finally, click "File" > "Export" > "Export as MP3" to export the merged audio in MP3. You can export the merged file in other formats like WAV as well.


1 Answers

You can do it with one invocation of sox like this:

sox -m in1.mp3 in2.mp3 in3.mp3 out.mp3

If you want to combine this with the pad effect you need to be clearer about what you want.

like image 192
Thor Avatar answered Oct 05 '22 15:10

Thor