Extract Song Lyrics From MP3 Files

Hi Guys,

I am hoping someone here can help me. I have a rather large MP3 file collection of almost 1,000 albums/14,000 songs. All are MP3s. I just discovered that some of them have song lyrics embedded in them.(much to my surprise). I know that MP3Tag can do batch operations. I have seen a reference to "UNSYNCEDLYRICS being a means to access these embedded song lyrics but I cant seem to figure out how to use it. What I would like to do is extract the song lyrics to a text file. One file for each song possibly have the text file name be the song title. Is this possible? If so would someone please be kind enough to assist me with this by providing directions? This would be very helpful as I am currently designing a media database and I would like to store the lyrics in the database. Any help you can provide is appreciated.

See this thread as something about the problem of getting lyrics out of a file:

What I don't yet understand: if you create a database and I assume that you read tag data from the files - why don't you also read the field UNSYNCEDLYRICS?

Thank you for your reply. In answer to your question, I did not read the ID3 Tags to obtain my data. I exported my data from itunes and then scrubbed and imported it into a more structured normalized set of tables. The lyrics data is not available in the export table. So if I understand you correctly the export from MP3Tag would be in a single file. How is this accomplished? Please explain. Many thanks.

Have a look at the export function in which you can define the fields (so probably not need to export anything via iTunes) and in a text format that you can process further.
There are a couple of readymade templates for various formats - and as the export scripts are plain text files, you can easily edit them.

The output, as described, goes to a single file. You can put together field variables to create a filename that matches the audio source file (plus a different extension).

Thank you for your reply. I have looked at the export function. My attempt to use it did not produce the desired result so I must have done something wrong. Hence the reason for my post here. I usually can figure things out on my own as long as I have a general idea of what to do, but I'm not having any luck here. Could you please provide more specific instructions on using the export function. Thank you for the suggestion, but I have already imported 90+ percent of my data into the structured database. The only actual important data left is the album cover art which is proving to be an issue. The lyrics were an after thought

The emb edded covers have to be exported with a different function (an Action of the type Export cover to file
As you do not supply any detailed information about the export script that you used or the target format that you intend to get, I cannot do a lot at the moment.

Thank you for your reply. I am afraid I don't understand what you mean? What script? I am unfamiliar with writing any scripts using this tool. That is the point of my post I do not know how to accomplish this task. As for the album covers I have that covered. They have already been extracted by others means. I was referring to the process of inserting them into the database. Can you provide me with a script that will extract the song lyrics?

It stays as it is: I don't know what format the output should look like.
So here is a sample script to export the field UNSYNCEDLYRICS:
$filename(%_folderpath%%title% Lyrics.txt,utf-8)$loop(%_filename%)%_filename%

Thank you for your reply. The sample you provided was very helpful. Thank you. It is working exactly as I would like but it only seems to process the first track of the album. one file per directory. I will continue to experiment with the program settings. I'm sure it is just a matter of having the correct program settings prior to executing the script. I was also able to make some headway in understanding the scripting language and created my own script. It does not work properly though. It appears to be appending data when it should not. I will continue to work with the script you provided as it is closer to the mark to what I would like to accomplish. One file per song in the same directory as the MP3. Thank you again for your assistance kind Sir. Stay Safe and Healthy.

Usually, such a script works for all selected files.

Thank you for your reply. I have selected all files in my collection prior to executing the script. What options should be checked in the export dialog? I have tried several combinations without success.

This is my script. I added your folderpath logic because it puts the files where I would like them.

$filename(%_folderpath%%title% Lyrics.txt,utf-8)

I tried it without anything ticked in the export dialogue and it produced an output as expected: all data for all selected files in a single file.
So it could be a good idea to have some kind of separator between the individual lyrics.
So, e.g.
$filename(%_folderpath%%title% Lyrics.txt,utf-8)

Is it possible to produce I text file per track instead of all of them in one file?

That is why I linked that utility in post #2

So that's a no. Seems odd since it is processing at the file level then you should be able to get I file per song/file. But fair enough. Right now I have 1 file per disc using the one file per directory option. Thank you for your help and patience. Your assistance is much appreciated.