Code Monkey home page Code Monkey logo

music-metadata-and-lyrics's Introduction

Music-Metadata-and-Lyrics

Python project that updates metadata (including album art) and searches for lyrics from the Genius API.

Requirements

Getting the project

Download the project or clone it with git. You can create a virtual environment if you can. Install the requisites by running

pip install -r requirements.txt

You will need to create an auth_token.txt file in the Source folder and paste a Genius token inside it. You can generate a genius token here

Update Metadata

Metadata.py takes in an mp3 file (or a folder path) and searches for the corresponding metadata from Genius.com using the Genius API and Eyed3 module.

Here is an example in a test folder I made:

image

Run Metadata Search (collected from Genius.com):

image

Finished Search:

image

Updated mp3 file:

image

Metadata.py contains the funtcion get_metadata,

get_metadata(song_file, art_option=0)

Which is called with a file path to an mp3 file, and an optional art_option which is set to 0 by default.

Setting art_option to 0 will update the file with the songs Album Art,

Setting it to 1 will update the file to the songs Song Art, which sometimes differ.

Search Song Lyrics

GeniusLyrics.py takes in a song name and artist name and searches Genius.com for the lyrics. The lyrics are saved to a json file called song_lyrics.json. Searches are performed on this saved data when offline. Here is an example, running GUI.py which is a simple gui for getting song lyrics

Example Search:

image

Output:

image

Contribute to the project

Take a look, run the code, and contribute if you'd like!

music-metadata-and-lyrics's People

Contributors

fer-hnndz avatar fingolfin7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

strezlessmusick

music-metadata-and-lyrics's Issues

Add/Update Genre Metadata

Need to find a way to do the following in the get_metadata() function:
a) Edit the genre for a given eyed3 tag,
b) Retrieve the genre for a song from the Genius API

Such hard work

Thanks so much for this, it's worked, and I've managed to find a bunch of meta data with it.

It's a proper chore to use though and I think you would be tones better converting to a proper package and getting it on pypy.

Also, it's not clear about the auth.txt file, and I used the https://docs.genius.com/ to generate an auth token but initially wondered if I needed to put both public & secret key in the text file.

Could do with some proper docs :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.