If I have several audio files in a directory, how would I go about writing a script that would take the audio from the time 10 seconds to 20 seconds from each file and concatenate these 10 second chunks together into a single audio file? Any specific packages, extensions, etc. which would be helpful? (I would prefer an answer for generic file types, but if a specific format is needed let’s go with mp3)
I would prefer python, but if you have an easy solution in some other language, please tell me.
Thank you much!
I’ve used mp3wrap from a bash script to catenate mp3’s. The mp3wrap package includes an mp3splt executable.
It’s not Python, but you could subprocess them from Python. They appear to be written in C, based on a quick ldd.