This is a simple Python script that allows you to convert MP3 files to WAV files. It utilizes the pydub
library for audio file manipulation.
Before using this script, make sure you have the following installed:
- Python 3.x
pydub
library
You also need to have FFmpeg installed on your system. FFmpeg is a command-line tool used for handling multimedia data, including audio and video conversion. The pydub
library relies on FFmpeg for audio file format conversion.
-
Visit the official FFmpeg website: https://ffmpeg.org/download.html
-
Scroll down to the "Windows Builds" section and click on the link that corresponds to your system architecture (32-bit or 64-bit).
-
Download the ZIP archive containing the FFmpeg binaries.
-
Extract the contents of the ZIP archive to a directory on your system. For example, you can extract it to
C:\ffmpeg
. -
Add the FFmpeg executable directory to your system's Path environment variable. Here's how:
- Open the Control Panel and go to System and Security → System → Advanced system settings.
- Click on the Environment Variables button.
- In the System variables section, select the Path variable and click on Edit.
- Click on New and enter the path to the FFmpeg executable directory (e.g.,
C:\ffmpeg\bin
). - Click OK to save the changes.
-
Open a new command prompt window and type
ffmpeg
. If everything is set up correctly, you should see the FFmpeg version information printed in the console.
-
Open Terminal.
-
Install FFmpeg using Homebrew by running the following command:
brew install ffmpeg
-
Wait for the installation to complete. Once finished, you should have FFmpeg installed on your system.
-
To verify the installation, type
ffmpeg
in the terminal and press Enter. You should see the FFmpeg version information displayed.
-
Open a terminal.
-
Install FFmpeg using the package manager for your Linux distribution. The package name might vary depending on the distribution. Here are the commands for some popular distributions:
-
Ubuntu/Debian:
sudo apt-get update sudo apt-get install ffmpeg
-
Fedora/RHEL:
sudo dnf install ffmpeg
-
Arch Linux:
sudo pacman -S ffmpeg
-
-
Wait for the installation to complete. Once finished, you should have FFmpeg installed on your system.
-
To verify the installation, type
ffmpeg
in the terminal and press Enter. You should see the FFmpeg version information displayed.
To install the required Python packages, use the following command:
pip install pydub
-
Clone the repository or download the
mp3_to_wav_converter.py
file. -
Open a terminal or command prompt and navigate to the directory where the script is located.
-
Run the script using the following command:
python mp3_to_wav_converter.py
-
The script will prompt you to enter the folder path containing the MP3 files and the destination folder path for the converted WAV files. Provide the required paths and press Enter.
-
The script will convert all the MP3 files in the specified folder to WAV files and save them in the destination folder.
-
The conversion progress will be displayed in the terminal.
-
Once the conversion is complete, you can find the converted WAV files in the specified destination folder.
Here's an example usage of the script:
Enter the MP3 files folder: /path/to/mp3_folder
Enter the destination folder for WAV files: /path/to/wav_folder
Converting /path/to/mp3_folder/file1.mp3 to /path/to/wav_folder/file1.wav
Converting /path/to/mp3_folder/file2.mp3 to /path/to/wav_folder/file2.wav
Converting /path/to/mp3_folder/file3.mp3 to /path/to/wav_folder/file3.wav
Conversion completed successfully.
This project is licensed under the GNU License. See the LICENSE file for more information.
- pydub - A simple and easy-to-use library for audio file manipulation in Python.