I have a plain text file containing a list of WAV files:
0001.wav 0002.wav
0003.wav 0004.wav
0005.wav 0006.wav 00007.wav 0008.wav
0009.wav
0010.wav
0011.wav 0012.wav 0013.wav
0014.wav
0015.wav
These same files are in the same folder as the plain text file.
According to How to merge several audio files using sox, I can use sox -m <filename> <filename> <filename>
to merge any files together in sox
. How can I use sox
to merge all of the files listed on the same lines into one file, with the output files named in sequence, e.g.:
- 0001.wav 0002.wav → m0001.wav
- 0003.wav 0004.wav → m0002.wav
- 0005.wav 0006.wav 00007.wav 0008.wav → m0003.wav