2

Could someone explain how to extract the lyrics from an mp3 file?I tried but I can't get any documents for this purpose.Just like the album art, how can we extract it in to a text file? Is it possible in Java?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user1089146
  • 127
  • 2
  • 7
  • 1
    The lyrics would have to be in the metadata of the MP3 file. Have you looked at the ID3 standard documentation? – Makoto Jan 15 '12 at 03:44
  • http://id3lib.sourceforge.net/id3/ – Dave Newton Jan 15 '12 at 03:52
  • I don't know why this question has so many downvotes... it's a perfectly legit question. MP3s can have tons of metadata, and lyrics have been around in the spec for years and years and years. Not all MP3s will have lyrics filled in, but many will (particularly purchased songs, which tend to have a full complement of metadata). – StilesCrisis Jan 15 '12 at 16:50
  • idont care about downvotes i just want the resources for my doubts,thats it. – user1089146 Jan 16 '12 at 04:25

2 Answers2

3

Take a look at this library: https://web.archive.org/web/20170718142051/http://www.fightingquaker.com:80/myid3/

It should do what you need.

Tiago Martins Peres
  • 14,289
  • 18
  • 86
  • 145
StilesCrisis
  • 15,972
  • 4
  • 39
  • 62
-1

MP3s do not store 'lyrics' beyond the sound wave of the (instruments and) vocalist.

If you want the lyrics, look to voice recognition. With the way many singers mumble, good luck with that.


Dave Newton points out:

ID3v2 defines lyrics as one of the standard metadata tags; see sections 4.8 and 4.9

So if those are defined, an MP3 tag library can extract them. Failing that, see above.

I doubt any MP3s encoded at home by owners of the music have lyrics attached. MP3s bought recently off iTunes might be a different story.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • ID3v2 defines lyrics as one of the standard metadata tags; see [sections 4.8 and 4.9](http://id3lib.sourceforge.net/id3/id3v2.4.0-frames.txt). – Dave Newton Jan 15 '12 at 03:50
  • 2
    I wanna see the death metal voice recognition lyrics; those will be better than the Siri gaffes. – Dave Newton Jan 15 '12 at 04:00