Skip to content

poco-loco-athul/Audio-renamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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

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. Add this API key to .apikey file in order to run the program.

Background

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.

Usage

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
  -n, --no-auto      If '--no-auto' is used, asks user the suggestions for the
                     renaming. Else, renames all songs with first choice.
  -t, --title-style  If '--title-style' is used, renames will have titles of
                     the song. Else, renames will be a combination of artists
                     and title.

Requirements

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

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

About

Renames mp3 audiofiles using acoustid web-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages