How to merge several audio files using sox

Yngwie Pompas picture Yngwie Pompas · Jan 31, 2013 · Viewed 11.7k times · Source

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

Answer

Thor picture Thor · Jan 31, 2013

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.