Does it support lyrics?
Opened this issue · 5 comments
Has the question been asked before?
- I have searched the existing issues
Question
I searched existed questions to find out if music-metadata support parse embeded lyrics while there isn't results.
code like this below, this.lyrics
is always null while the .mp3
file does exist embeded lyrics:
async getMetadata() {
this.lyrics = mm.common.lyrics ? mm.common.lyrics : ['null']
}
To avoid the .mp3
file is broken, I tried other npm library like id3-parser, it can parse the embeded lyrics
Add supplementary note
const mm = await parseFile(this.filePath, { duration: true })
Would love to see lyrics support! It's an official ID3 tag.
There is some lyrics support present, including the ID3v2 / ID3v2 SYLT tag.
Unit test covering this:
music-metadata/test/test-id3v2-lyrics.ts
Lines 17 to 20 in ca98704
Tag mapping (I know, very hard to scroll to the right side of the table): here.
But there maybe lyric standards which are not support yet, such as Lyrics3 v2.00, which I believe is requested here: #264.
Interesting. I can't tell what version of lyrics kid3 is using, but see the screenshot below:
And (surprisingly) ffprobe
can detect this too:
Input #0, wav, from 'quiet.wav':
Metadata:
genre : Ambient
creation_time : 10:54:55
time_reference : 283583
umid : 0xBB6126C10EAD442384B897E045E2CC3200000000000000000000000000000000
title : Test Track
artist : Sam Hulick
album : Album Name
track : 1
lyrics-eng : Hello hello!
date : 2023
And actually, I do see lyrics in music-metadata
's output! Just not where I thought it would be (under a USLT
tag in native
):
{
native: {
'ID3v2.3': [
{ id: 'TIT2', value: 'Test Track' },
{ id: 'TPE1', value: 'Sam Hulick' },
{ id: 'TALB', value: 'Album Name' },
{ id: 'TRCK', value: '1' },
{
id: 'USLT',
value: { language: 'eng', description: '', text: 'Hello hello!' }
},
{ id: 'TYER', value: '2023' },
{ id: 'TCON', value: 'Ambient' }
]
},
So this really isn't a big issue. It would be nice if it appeared under common
for easy access, but it's just a nice-to-have.
Seems that an attempt to map USLT
had defined, but was never really implemented properly.