Improperly named audio files are great sorrow while enjoying the music. This project renames mp3 files in a selected directory as the user prefers with the help of AcoustID web service.
AcoustID web service helps us to search our song in their audio database and get the details. In order to use the web service from your application, you need to register the application and collect the API key.
This project is broken down in the following parts:
- Gets a list of mp3 files from the given directory
- Makes fingerprints of mp3 files
- Checks the fingerprint in the database and get details
- Asks user suggestion to rename
- Renames the mp3file based on user input
Read more about the project in the blog.
Requires python3.x
Renames mp3 files in a selected directory based on the data from acoustid web service. positional arguments: audio_path file-path of the mp3 directory optional arguments: -h, --help show this help message and exit --style [STYLE] If 'style' is True, renames will have titles of the song. If 'style' is False, renames will be a combination of artists and title. (default: False)
Check ‘requirements.txt’ for dependencies
- Install them with:
pip install -r requirements.txt
- To add more dependencies, use pip and:
pip freeze > requirements.txt
Tests can be run, once required dependencies are there. To test:
pytest test_audio_renamer
To check coverage of these tests:
pytest --cov=audio_renamer
- `test_audio_renamer.py` contains tests for `audio_renamer`. It has 63% coverage.