0

This question already has an answer here:

I recently received hundreds of audio files from a government agency. They are numbered sequentially in the order they were recorded and each file is anywhere between 1 - 12 seconds in length. I am looking for a way to programmatically combine all of those into a single audio file, but haven't found anything.

Got anything for me? I'm hopeful that this won't end up being a manual operation!

(I have found plenty of solutions out there which would work for a small number of files, but nothing that works for my use case.)

marked as duplicate by audionuma, Rory Alsop Oct 12 '18 at 14:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • sox can do this. You might find out that using mp3 files as input leads to gaps in the produced output (stackoverflow.com/questions/25280958/…) – audionuma Oct 1 '18 at 5:55
  • May I ask why you want to do this? Obviously they were sent as separate files for a reason. – Mark Oct 1 '18 at 7:02
  • Mark - The audio is recorded radio traffic and the agency’s recording system only stores audio when someone transmits (metadata about the transmission is stored as well.) I want to listen to it in the car without having to put ~750 "songs" on my phone. Just what you thought, right? :) – Custom Soundtrack Oct 1 '18 at 7:32
0

SoX can merge several input audio files into one.

Basic example :

$ sox infile1.wav infile2.wav out.wav

If your files are stored in the same directory and are named in ascending order (like 001whatever.mp3 to 700whatever.mp3), you can merge them from the directory :

$ sox *.mp3 out.mp3

Notice that the input files will be re-encoded into the output, with quality loss as your input is mp3.

If the naming isn't numbered, that will require some logic into a script to merge them in correct order.

Not the answer you're looking for? Browse other questions tagged or ask your own question.