This Python script automates audio processing tasks using Audacity, applying effects and exporting files to both WAV and MP3 formats. The script launches Audacity, processes .aup3 files in a specified directory, and applies effects such as normalization and compression.
- Python 3.8 or higher
- psutil - for managing system processes.
- pyaudacity - to interact with Audacity’s API for automation.
Ensure that Audacity is installed on your system.
- Clone the repository:
git clone https://github.com/benjamintemitope/audacity-automation.git
cd audacity-automation- Install the required Python packages:
pip install -r requirements.txt- AUDACITY_PATH: Update this path to where Audacity is installed on your system.
- LAUNCH_DELAY: Time delay in seconds to ensure Audacity has launched before the script attempts to interact with it. Default is set to
3seconds.
To run the script, use the following command:
python script.py <directory><directory>: The path to the folder containing.aup3files you want to process.
python script.py "C:\path\to\your\aup3\files"The script will launch Audacity (if it’s not already running), process each .aup3 file in the specified directory, apply effects, and export the results as both WAV and MP3 files.
- Audacity Not Launching: Verify that
AUDACITY_PATHpoints to the correct installation path. - Missing Dependencies: Install dependencies from
requirements.txt. - Permissions Issues: Run the script with administrative privileges if you encounter file access errors.