moehmeni / syncedlyrics

Get an LRC format (synchronized) lyrics for your music
MIT License
239 stars 23 forks source link

Return additional metadata #34

Closed henrydatei closed 4 months ago

henrydatei commented 4 months ago

I have the problem that I want to search for "We own it" by 2 Chainz and Wiz Khalifa:

import syncedlyrics
syncedlyrics.search("we own it 2 chainz", allow_plain_format=False)

This return the correct lyrics:

[00:07.81] It's Young Khalifa man\n
[00:10.79] 2 Chainz!\n
[00:13.17] Money's the motivation\n
[00:14.53] Money's the conversation\n
[00:16.13] You on vacation, we gettin' paid so\n
[00:18.73] We on paid-cation, I did it for the fam\n
[00:21.41] It's whatever we had to do, it's just who I am\n
[00:24.10] Yeah, it's the life I chose\n
[00:26.41] Gunshots in the dark, one eye closed\n
[00:29.14] And we got it cookin' like a one-eyed stove\n
[00:32.08] You can catch me kissin' my girl with both eye' closed\n
...
[02:15.73] See these people I ride with (I ride or die for life)\n
[02:18.09] This moment, we own it\n
[02:21.10] This moment, we own it\n
[02:22.40] I ride or die for mine\n
[02:22.87] I'm ride or die material\n
[02:23.67] One life to live, so here we go\n
[02:24.24] This moment, we own it\n
[02:24.75] 

But the timesteps seem to be wrong, the whole songs lasts for about 3:47 and not 2:24 as the last lyrics line indicates. Now I question myself if the returned lyrics belongs to a different version of the song. It would be great if you could return some additional metadata (if the APIs provide that) to check against that

moehmeni commented 4 months ago

If you only want to know which provider it is, just use -v. Also, I have written another solution to extract the provider in this thread.

However, I think the problem is more about being able to search for music using its metadata, such as duration, so we can search more accurately. This is a follow-up to issue #12, and I will look into it when I have free time.

moehmeni commented 4 months ago

I made a fix that was leading to incorrect search results, I tested your song and it gives the 3:4x duration version now. You can clone the repo for latest changes and test again. Feel free to reopen the issue in case of any error.