Skip to main content
Photo of DeepakNess DeepakNess

MP3Detective: AI-Powered Music Metadata Manager

I have a huge collection of MP3 files for Hindi songs, and most of them have incorrect or missing metadata (like song name, artist, album, etc.). I tried many online tools but none of them worked well, especially for old Bollywood songs.

So, I decided to build my own tool using OpenAI's GPT-4o model. And... say hello to MP3Detective – a Python tool that automatically finds and updates MP3 metadata.

MP3Detective Demo

How it works

The tool is quite simple. You just:

  1. Put your MP3 files in the input folder
  2. Run the Python script
  3. Get your updated files in the output folder

The best part? It works with any language or music genre. I tested it with my old Hindi songs collection, and it worked with about 95% accuracy. Yes, it did make some mistakes with very old or rare songs, but that's expected.

I also have a quick video showing how it works:

Building the tool

I used Python to build this tool because it has great libraries for handling MP3 files. The main pieces are:

Here's the folder structure of how everything is placed:

mp3detective/
├── .gitignore        # Git ignore rules
├── app.py            # Main application file
├── requirements.txt  # Python dependencies
├── README.md         # This documentation
├── input/            # Place your MP3 files here
└── output/           # Updated files will appear here

The tool creates a copy of your original files, so you don't lose anything. It also keeps a detailed log of what it's doing, which helps if something goes wrong.

Real-world testing

I tried it with about 1,500 old Hindi songs first. Here's what I found:

And this is what it shows in the terminal after the process finishes.

Terminal output after the task finishes

Using it yourself

Want to try it? It's pretty simple:

  1. Get the code from GitHub
  2. Install Python if you don't have it
  3. Add your OpenAI API key
  4. Put your MP3 files in the input folder
  5. Run the script

That's it! The tool will do its magic and you'll find your updated files in the output folder.

The code is open source, so feel free to try it out or even make it better!

Comment via email