2

I want a software to edit my audio files, specifically:

I have some audio files (mp3) which I want to repeat every 40 secs of it (first 40 secs are repeated 3 times, then next 40 secs be repeated 3 (or more) times and so on.)

Do you know any software to do it quickly?

I use Windows 7. I tried with BigaSoft Total Video converter to trim the pieces, but it takes long time to do it. also I've tried with movie maker but yet same problem. Is there any software to only by giving it this parameters (when repeat and how many times to repeat) do the work?

  • 1
    Give Audacity a try. – Ashutosh Dave Dec 23 '14 at 18:11
  • Do the files have the same length? Do they divide by 40 evenly? – Seth Dec 23 '14 at 18:16
  • @Seth, no they don't. – abdolahS Dec 23 '14 at 18:48
1

This is exactly the sort of task that you can use python + pyDub for - of course using windows rather than Linux or OS/X you will have to install both python and libav before it will work!

If you can get it installed then your task is as simple as typing into somefile.py:

from pydub import AudioSegment
import sys

if len(sys.argv) < 3:  # Not enough arguments so be helpful
    print "You need to supply the name of an mp3 file followed by"
    print "an output name and a sequence of start:end:repeat segments"
    print "Where start and end are a number of seconds in to the track"
    print "and repeat is the number of times to repeat that section"
else:
    song = AudioSegment.from_mp3(sys.argv[1]) # Read in the track
    result = AudioSegment.empty() # Somewhere to put it
    for SER in sys.argv[3:]:
        (start,end,repeat) = SER.split(':')
        start = int(start) * 1000
        end = int(end) * 1000
        repeat = int(repeat)
        result += song[start:end]*repeat
    result.export(sys.argv[2], format="mp3") # Save

the running:

python *somfile*.py *nameoftrack*.mp3 *ouputname*.mp3 0:40:3 40:50:2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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