By the way, I also found that you can simplify the earlier parameters for kid3-cli.exe:
-c select "%_path%" -c "get USLT:''%_filename%.lrc''"
into
-c "get USLT:''%_filename%.lrc''" "%_path%"
(just give the path of the file as the last parameter)
Hey everyone!
Really great job by all parties involved! Have been waiting for this kind of tool for ages!
However, I do have one problem when using the provided ".mte" file.
.vbs throws an error: Expected end of statement
By looking at Line: and Char: I've pinpointed that's because the text of some lyrics has quotes in it. Like: He said: "Hi!".
How can I fix it (beside manually deleting them in each mp3 file that's involved)? I have close to zero knowledge in Visual Basic.
Thanks for the feedback.
I should have known double quotes would be an issue.
Not only are they a problem in the VBS script, they need to be escaped on the Windows command line.
I made a correction and some improvements and tested for other special characters:)(^|&<>\/’‘
The attached MTE script should now work properly.
REPAIRED (May 20,2022)-Write Lyrics to Individual Files.mte (7.7 KB)
Thank you, that's a great job!
It finally works!
However, it doesn't export all the lyrics ![]()
I've pinpointed the problem here too, but again, I don't know how to fix it.
It's some apostrophes, which I don't even know how to type on a keyboard, so I'm just gonna copy/paste it:
’ and ‘
Example in lyrics:
Ho fatto l’amore con me
‘Cause I never loved someone like you before
Nice catch. Thanks for reporting. ![]()
I amended the script and replaced the attachment in the previous post.
Download it again and see if it is OK.

Mission accomplished!
Thank you so much!

Thank you all for your work on this. I tried the mte ryerman provided and for some reason it only grabs a small percentage of my lyrics. Would this be because most of my files are FLAC? Just curious if anyone has any ideas. It was the same result when I used kid3 instead of powershell.
Upload a file that you believe contains Unsynced Lyrics but for which the mte script fails to create a LRC file.
Maybe I can find a solution.
It is probably best to use a file sharing service and post a link here.
As you can see in your screenshot, the names of all the Vorbis Comments, except UNSYNCED LYRICS, have no spaces.
That is common in the metadata world: spaces are not usually used in a field name. The underline character is often used instead.
Mp3tag, and my script, use %unsyncedlyrics% as a placeholder, without any spaces.
Therefore, any information stored in UNSYNCED LYRICS is not returned when using %unsyncedlyrics%.
You can verify that by creating a column in the standard way.
I can think of 3 ways to overcome your situation:
- I could edit my script to accommodate this particular issue. I am not prepared to do that.
- You could rewrite all files that use UNSYNCED LYRICS so that the lyrics are in UNSYNCEDLYRICS and UNSYNCED LYRICS is maybe deleted.
That can be done by an action group. - Use Mp3tag's mapping function to map UNSYNCED LYRICS to UNSYNCEDLYRICS for Vorbis Comments.
Just to add something on the problem with vorbis comments:
@ryerman - Your above Tool using Powershell works perfectly for my needs within mp3tag. I read through several mp3tag forum posts with the general goal of extracting lyrics to text files, and your "Tools" method worked best for me.
To review, I did this:
mp3tag --> Options --> Tools:
Name: Export LYRICS to TXT with Powershell
Path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Parameter:
-windowstyle hidden -command "Write-Output ''$regexp($regexp($regexp($replace(%lyrics%,'',''''),^\w+\|\|,),\r\n,'' ''),''\s''$,)'' | Out-File -FilePath ''$replace(%_folderpath%%_filename%,'','''').txt'' -Encoding Unicode"
The only change I made was from %unsyncedlyrics% to %lyrics%. The lyrics metadata for my flac/mp3 files resides in the %lyrics% tag, and they are synced lyrics. Thus, all I had to do after creating your tool was then select all the flac/mp3 songs I wanted in the mp3tag window, hit CTRL-1, and the result was that each flac/mp3 file had an accompanying text file. Those songs with lyrics had an accompanying text file containing the lyrics, properly formatted, and those songs without lyrics had accompanying text files which were blank files (which is fine for me).
Here is my dilemma, and if you are still monitoring this forum thread I wondered if you or others might have suggestions.
While this tool is perfect for me for within mp3tag, and I realize this forum is for questions about mp3tag, since this tool is using Powershell and consists of Powershell parameters, I wondered if I could "reverse" your tool. In this way, I would actually never open mp3tag - I could therefore automate the process and extract the lyrics via a Windows CMD script. Currently, I either do the extraction within mp3tag with your tool, or I accomplish that extraction (in the below case for flac files) via two steps in the following Windows CMD code:
for %%x in (*.flac) do ffprobe "%%x" -show_entries format_tags=lyrics -of compact=p=0:nk=1 -v 0 > "%%~dpnx.txt"
powershell -command "$filePath = '.\*.txt'; Get-ChildItem $filePath -Recurse | ForEach-Object {(Get-Content $_).Replace('\n',\"`r`n\") | Set-Content $_}"
The reason I had to do it in two steps is because for whatever reason the ffprobe command - while it did successfully extract the lyrics metadata - formatted the text files with literal "\n" strings instead of actual newline/carriage returns at the end of each line. The second command (Powershell within CMD) then "fixes" the text files so they have actual carriage returns for each line of lyrics. Your Powershell mp3tag tool produces text files which are perfectly formatted, and no "fixing" is needed - AND, it uses Powershell, not ffprobe. I would prefer to not use ffprobe because I am trying to use as few "extra" 3rd party executables/dependencies as possible. I like ffprobe (or maybe even exiftool, which can do similar extractions in my understanding), but I am trying to see if I could JUST use Powershell within the Windows CMD environment.
My question is this: Can your mp3tag Powershell lyrics extraction tool be reversed to just a "Powershell -command" within Windows CMD?
To be blunt: I don't really understand Powershell very well at all, nor do I understand "regular expression" (regexp) very well, so I am sure my attempts to do this reversal are pretty bad and way off. Here is what I tried for a single audio file called "test.flac":
powershell -command "(gc test.flac); Write-Output '$regexp($regexp($regexp($replace(lyrics,','),^\w+\|\|,),\r\n,' '),'\s'$,)' | Out-File -Encoding Unicode test.txt"
I noted earlier in this thread that you had stated, "The single quotes are doubled because they are special characters in Mp3tag and must be escaped to be used literally."
Therefore, I tried to "reverse" that and changed all "doubled single quotes" to just single quotes to be appropriately formatted for the Windows CMD environment. In any event, as I am sure it is not surprising to hear, the above code did not work. It spewed garbage all over the command window for about 2 minutes, then produced a text file that did NOT have the lyrics.
Secondly, even though I couldn't get the single file code to work, I tried to write code to do your Powershell extraction for multiple audio flac files. I tried this:
powershell -command "$filePath = '.\*.flac'; Get-ChildItem $filePath -Recurse | ForEach-Object {Write-Output '$regexp($regexp($regexp($replace(lyrics,','),^\w+\|\|,),\r\n,' '),'\s'$,)' | Out-File -Encoding Unicode '.\*.txt'}"
But this command wouldn't work at all. As is obvious, I don't understand Powershell.
I assume that Powershell CAN successfully extract lyrics metadata (or any audio metadata for that matter) on its own since your mp3tag Tool works and from what I can tell in my limited knowledge, your tool uses Powershell to execute. Or will those Powershell parameters in your Tool only work within mp3tag?
If the Powershell parameters in your mp3tag Tool can work independently (outside mp3tag) within the Windows CMD environment, would you or someone else know how to reverse your tool? In other words, what would be the "Powershell -command" Windows CMD code to extract the lyrics tags to text in batch, for all flac files within the working directory?
I could not figure out where else to ask this question, so my apologies in advance if this isn't the correct forum in which to ask it (since my question is a "reverse mp3tag" question). If someone is able to answer my question, thank you in advance.
Even if this can't be done outside mp3tag with just Powershell and CMD, I am happy to work within mp3tag and use your tool as it currently exists. The tool works really well and I love the mp3tag program.
Maybe, but I haven't used Powershell in any of these scripts to extract lyrics.
I don't know how to extract/read metadata using Powershell.
In my scripts, Mp3tag extracts the lyrics which are then processed by Powershell cmdlets.
Thanks for the quick response! I appreciate the clear explanation; I did not understand that in your scripts it was Mp3tag that was doing the actual extraction with the processing then being done by the Powershell cmdlets. I did a bit of reading outside the Mp3tag forums, and while it may be possible for Powershell to extract/read audio metadata, from what I can tell it still may require a "library" called TagLib. So I'm not 100% sure, but it may not be possible for Powershell to independently extract/read audio metadata on its own.
Basically, you could use this Powershell-Code:
# Run in MP3 folder
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace((Get-Location).Path)
$folderItems = Get-ChildItem -Filter *.mp3 | foreach { $folder.ParseName($_) }
# 0 Name, 1 Size, 2 Item type, 13 Contributing artists, 14 Album, 15 Year
# 16 Genre, 20 Authors, 21 Title, 27 Length, 28 Bit rate
$properties = 0,1,2,13,14,15,16,20,21,27,28
foreach($item in $folderItems)
{
$fileMetadata = @{}
foreach($property in $properties)
{
$name = $folder.GetDetailsOf($folderItems, $property)
$value = $folder.GetDetailsOf($item, $property)
$fileMetadata.Add($name, $value)
}
[PSCustomObject]$fileMetadata
}
You can find the values for the properties list here:
UNFORTUNATELY, there is no (yet known) property and # for lyrics.
If you find a column name in your Windows File Explorer where you can see the lyrics, I could find the number for it.
Yes, this is the same result as I got in the linked research topic.
ExifTool is its own tool, no dependency on Windows File Explorer, Shell.Application, Powershell.
If you really just want to export the lyrics, you can use ExifTool just like this:
exiftool -lyrics filename.mp3
Hint:
If you need to export lyrics in a language other then eng (which is the default setting), you have to specifiy the language.
For example, if your file has German lyrics, it would look like this:
exiftool -lyrics-deu filename.mp3
The first 3 letters in your UNSYNCEDLYRICS tag shows the needed language code.
Thank you for the reply and the hint on changing the default eng language for ExifTool. I see your point that ExifTool is its own tool, and thus since it has no dependency on Windows File Explorer, Shell.Application, Powershell, I would not be able to find the property and # for LYRICS through ExifTool to use in your Powershell code; that makes sense now. I have experimented with ExifTool and ffprobe a bit, and have done the following for extracting lyrics for each flac file in the working directory and then exporting those lyrics to a text file with the same filename of the respective flac:
ExifTool
"C:\Program Files\ExifTool\ExifTool.exe" -s3 -Lyrics -w %%f.txt "*.flac"
ffprobe
for %%x in (*.flac) do ffprobe "%%x" -show_entries format_tags=lyrics -of compact=p=0:nk=1 -v 0 > "%%~dpnx.txt"
They both work pretty nicely. And of course, I love Mp3tag and will continue to use it as my primary means of extracting lyrics via the Tool discussed above. But I would still be very interested if a way could be found to do it within Powershell if only I could find the property and # for LYRICS.
I played around with your Powershell code, and it is great. I plugged in various numbers that I knew from your comments and your linked research topic. For example, for this file:
1984-10-19-A-ha-Take On Me.flac
I plugged in
$properties = 21
Which corresponds to "Title", and the console window provided me the name:
Take On Me
----------
Take On Me
Question: I am not very skilled in Powershell. If I wanted to export one of the values that your code returns to a text file (like "Title"), how would I do that via Powershell? For example, let's say I have 20 flac files in the working directory and I plug in "21" to have the console screen return the Title for each of those 20 songs. How would I then continue in the Powershell code to have a text file generated (based on the respective name of each flac file) that has the "Title" in each text file?
Then, if I extend the code in that manner (generating text files based on the #) AND figure out the # for LYRICS, I am thinking that would be equivalent to the ExifTool or ffprobe code or Mp3Tag tool I have worked with before.
I spent several hours Googling various search terms trying to see if there is any tool that can identify it or someone in a forum post who has determined what the # is for LYRICS. I also just tried plugging random numbers in, which is not a very efficient way to figure it out. In any event, it is proving to be very challenging; I have not found it.
Thanks again very much for your help.
I have tried all possible values from 1 to 500.
There is currently no column # for Lyrics (as you don't find a way in the Windows File Explorer to show the Lyrics in a column).
Of course you can try it by yourself and expanded loops from 1 to 10'000?
For your other PowerShell questions:
Just scroll up and see the existing solutions from @ryerman
If you don't find the code you need, I suggest to ask in a specialized PowerShell-Forum.
Thanks again for your help. I have posted my Powershell questions to stackoverflow.
