views:

192

answers:

2
+2  Q: 

scripting Audacity

Is there any scripting library for Audacity?

Specifically, I'm looking for a way to give it a long mp3 file podcast.mp3 and have it split into files of, say, 10 minutes each: podcast0.mp3, podcast1.mp3 etc...

I don't want to do this manually, since I want to run all the podcasts I listen to through this script.


Some background:
There are various podcasts I listen to (for instance, Stackoverflow) that are very long. I listen to these on my cellphone which has a dinky MP3 player that doesn't allow me to jump to an arbitrary time in the file. This MP3 player has a nasty habit of forgetting where in the file I was. For instance:

  • Sometimes if somebody calls me while I'm in the middle of a podcast it'll start it from the beginning.
  • Sometimes I pause a podcast when I get to work, and when I try to continue it at the end of the day it's reset to the beginning of the track.

When this happens, I have to manually fast forward it or rewind it. This dinky player fast-forwards at a rate of 5x, so if I was in the middle of the podcast it can take me 6 or 7 minutes of holding the fast-forward button to get back to where I was. I figure if I split the long podcasts into shorter files, I can save a bit of annoyance.

+4  A: 

I would suggest using a different tool such as ffmpeg or mp3split. Those are command-line tools so will be easy to script.

Douglas Leeder
+1  A: 

If you are only interested in splitting the files, then I would go with Douglas' suggestions. However, if you want to use Audacity for its GUI capabilities, Audacity has scripting capability that uses the pipe. It's called mod-script-pipe. If you download the source from svn you will see an example in the scripts folder named pipe-test.pl.

fsmc