A simple Python script that converts WAV audio files to MP3 format.
- Python 3.x
- pydub library
- ffmpeg (required by pydub)
-
Install Python dependencies: bash pip install pydub
-
Install ffmpeg:
- Windows: Download from ffmpeg website
- Mac:
brew install ffmpeg
- Linux:
sudo apt-get install ffmpeg
Run the script from the command line, providing the path to your WAV file: bash python main.py path/to/your/file.wav
The script will create an MP3 file in the same directory as the input WAV file.
- Converts WAV files to MP3 format
- Maintains the original filename with new extension
- Provides detailed error messages and debugging information
- Input path normalization for cross-platform compatibility
The script includes error handling for common issues:
- Missing input file
- Incorrect file format
- Invalid file paths