[GH-ISSUE #281] Lyric finder returns incorrect lyrics #145

Closed
opened 2026-03-02 23:44:58 +03:00 by kerem · 5 comments
Owner

Originally created by @sewnie on GitHub (Nov 7, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/281

Describe the bug
The Lyric finder returns random lyrics for a song i listen to, but the lyrics are for a completely different song.

To Reproduce
Listen to any obscure music, maybe one with or without vocals.

Expected behavior
No lyrics found

Screenshots
image
image
The above song has actual lyrics, however this is a different lyrics set.
image

Originally created by @sewnie on GitHub (Nov 7, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/281 **Describe the bug** The Lyric finder returns random lyrics for a song i listen to, but the lyrics are for a completely different song. **To Reproduce** Listen to any obscure music, maybe one with or without vocals. **Expected behavior** `No lyrics found` **Screenshots** ![image](https://github.com/aome510/spotify-player/assets/47404953/c9fa3d55-7d28-4333-b783-2aed4ed3bff7) ![image](https://github.com/aome510/spotify-player/assets/47404953/7880c42a-1989-4cb2-981b-f53140c6523f) The above song has actual lyrics, however this is a different lyrics set. ![image](https://github.com/aome510/spotify-player/assets/47404953/850d6b6a-0718-481d-9fe9-b130b205bb95)
kerem 2026-03-02 23:44:58 +03:00
Author
Owner

@aome510 commented on GitHub (Nov 11, 2023):

Can use string similarity metric (https://docs.rs/strsim/latest/strsim/) to detect similarities between query title vs returned title, and query artists vs returned artists. Genius is kind of a best-effort way to get the lyric anyway, so the result is not always correct.

<!-- gh-comment-id:1806612738 --> @aome510 commented on GitHub (Nov 11, 2023): Can use string similarity metric (https://docs.rs/strsim/latest/strsim/) to detect similarities between query title vs returned title, and query artists vs returned artists. Genius is kind of a best-effort way to get the lyric anyway, so the result is not always correct.
Author
Owner

@sewnie commented on GitHub (Nov 18, 2023):

How come Spotify is able to retrieve lyrics with accuracy then? they use their in-house lyrics?

<!-- gh-comment-id:1817387073 --> @sewnie commented on GitHub (Nov 18, 2023): How come Spotify is able to retrieve lyrics with accuracy then? they use their in-house lyrics?
Author
Owner

@aome510 commented on GitHub (Nov 18, 2023):

How come Spotify is able to retrieve lyrics with accuracy then? they use their in-house lyrics?

Not sure. Official app indicates they use https://www.musixmatch.com which may have better search functionality than genius.

<!-- gh-comment-id:1817608834 --> @aome510 commented on GitHub (Nov 18, 2023): > How come Spotify is able to retrieve lyrics with accuracy then? they use their in-house lyrics? Not sure. Official app indicates they use https://www.musixmatch.com which may have better search functionality than genius.
Author
Owner

@JingYenLoh commented on GitHub (Mar 12, 2024):

Some time ago, I hacked together a PoC that used lyricstify's API to fetch lyrics, which iirc uses Spotify's internal APIs under the hood to retrieve the lyrics. I did it because genius often doesn't contain lyrics to songs I listen to.

My goal was to clean up the code (it's a dirty hack and the lyricstify maintainers might not appreciate calling their API directly) and eventually upstream it, but I never found the time to. I'm now hoping this information is helpful to whoever is interested in tackling this problem!

<!-- gh-comment-id:1991857740 --> @JingYenLoh commented on GitHub (Mar 12, 2024): Some time ago, I hacked together a [PoC](https://github.com/aome510/spotify-player/commit/6908ed63978d5e9a9b0367599c751ddd5a788247) that used [lyricstify](https://github.com/lyricstify/lyricstify)'s API to fetch lyrics, which iirc uses Spotify's internal APIs under the hood to retrieve the lyrics. I did it because genius often doesn't contain lyrics to songs I listen to. My goal was to clean up the code (it's a dirty hack and the lyricstify maintainers might not appreciate calling their API directly) and eventually upstream it, but I never found the time to. I'm now hoping this information is helpful to whoever is interested in tackling this problem!
Author
Owner

@genricoloni commented on GitHub (Sep 16, 2024):

I kinda found a pattern for this behaviour: some songs that have a featuring on Spotify (meaning that more than one artist is present in artist_names) don't have all these names in the song lyric's page on Genius.
An example is the following: by playing the song "Lost in the Dark" by "Left To Suffer" and "Peleface Swiss", the query will be "Lost in the Dark Left To Suffer Paleface Swiss". The results of the query is

image

And we can see that the song we wanted has not been found.

While instead performing the crafted query "Lost in the Dark Left To Suffer", so using only the first artist, the response will be:

image

Note that "Marc Zelli" is the singer of the group "Paleface Swiss", so the lyric is the correct one.

In my experience, I can say that using only the first artist is usually enough to get the correct lyric, but I don't know how this can actually impact the quality of the functionality.

<!-- gh-comment-id:2353518578 --> @genricoloni commented on GitHub (Sep 16, 2024): I kinda found a pattern for this behaviour: some songs that have a featuring on Spotify (meaning that more than one artist is present in `artist_names`) don't have all these names in the song lyric's page on Genius. An example is the following: by playing the song "Lost in the Dark" by "Left To Suffer" and "Peleface Swiss", the query will be "Lost in the Dark Left To Suffer Paleface Swiss". The results of the query is ![image](https://github.com/user-attachments/assets/a825ec9f-f7dd-497c-af42-3a26de6ee651) And we can see that the song we wanted has not been found. While instead performing the crafted query "Lost in the Dark Left To Suffer", so using only the first artist, the response will be: ![image](https://github.com/user-attachments/assets/420e1a77-14ae-40de-956f-fd9029f1c88c) Note that "Marc Zelli" is the singer of the group "Paleface Swiss", so the lyric is the correct one. In my experience, I can say that using only the first artist is usually enough to get the correct lyric, but I don't know how this can actually impact the quality of the functionality.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#145
No description provided.