Automating file conversion

Good morning!

First let me say I’m not an audacity user, in the slightest… I can use it to manually convert a file to the proper format, but I’d like to automate this process somewhat.

What I am looking to do is have a script (Python, Powershell) run on a schedule and look in a folder for mp3 files. If it sees a files, I want to feed this file in to Audacity to convert it to a different specific format (WAV, u-law, 8bit, mono, 8000khz) so that I can push this over into my phone system’s IVR prompts. I can do the rest, but interfacing powershell or python to Audacity is where i’m lost - can anyone point me in the right direction or provide some examples of how i could perform this kind of task?


It would be quicker and easier to use a command line decoder such as LAME or SoX.

Alternatively you may be able to use a native Python decoder library such as “pymad”.

Thank you! I ended up getting sox to do exactly what I needed pretty easily. I appreciate the tip!