Removing music from mp3 files

I got an interesting problem to solve the other day. A few friends have a local radio show and we want to put the recordings of it online. Of course, there are very different rules on how music can be played on radio as opposed to how is can be shared in a downloadable/podcast format so we have to remove the music from the recording. I offered to help with that, started up Audacity and got to work.

It was quickly very clear to me though, that at least in theses particular recordings, it was obvious just by looking at the wave forms where the music was. So I thought.. if I can see it, the computer can see it. And then instead of doing the work I was supposed to, I set off to solve the problem in code.

I think the work of removing all the music from all the audio files manually would have taken a couple of hours. But I opted for spending a couple of days rather to solve it.

And this is what came of it

https://podcastur.herokuapp.com/

This is a simple website, written in Django, using django-q to distribute the work to workers when there is any real work to do (as it is quite heavy to remove the music from hours of radio and my free Heroku tier would be eaten up pretty fast, the worker is an old mac-mini running Linux. It’s not fast, but it gets the work done. Eventually). The files are stored on IBM Object Storage while being processed.

The algorithm I came up with for removing music is quite simple and works for the radio recordings I had. It may work for others but there has been no extensive testing. Feel free to try it out.

Leave a Reply

Your email address will not be published.