[GH-ISSUE #1262] translation of lyrics #579

Open
opened 2026-02-27 19:31:22 +03:00 by kerem · 1 comment
Owner

Originally created by @ErfanM98 on GitHub (Mar 10, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1262

Is your feature request related to a problem? Please describe.
When I was searching through this awesome repo, I came across this :

pub struct LyricsInner {
    // TODO: 'alternatives' field as an array but I don't know what it's meant for
    pub fullscreen_action: String,
    pub is_dense_typeface: bool,
    pub is_rtl_language: bool,
    pub language: String,
    pub lines: Vec<Line>,
    pub provider: String,
    pub provider_display_name: String,
    pub provider_lyrics_id: String,
    pub sync_lyrics_uri: String,
    pub sync_type: SyncType,
}

I want to add that the 'alternatives' field is actually the translation of the lyric. This is a Chinese repo that manipulates Spotify to translate the result to Chinese.
Describe the solution you'd like
I did not see any tracks on the official Spotify app that has the translation. However, I modified my requests according to the mentioned script and I managed to see the feature that is something like this (on iOS):

Additional context
By the way, I did not find any .proto files related to lyrics. Could you please help me to locate that files?

Originally created by @ErfanM98 on GitHub (Mar 10, 2024). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1262 **Is your feature request related to a problem? Please describe.** When I was searching through this awesome repo, I came across [this](https://github.com/librespot-org/librespot/blob/dev/metadata/src/lyrics.rs) : ``` pub struct LyricsInner { // TODO: 'alternatives' field as an array but I don't know what it's meant for pub fullscreen_action: String, pub is_dense_typeface: bool, pub is_rtl_language: bool, pub language: String, pub lines: Vec<Line>, pub provider: String, pub provider_display_name: String, pub provider_lyrics_id: String, pub sync_lyrics_uri: String, pub sync_type: SyncType, } ``` I want to add that the 'alternatives' field is actually the translation of the lyric. [This](https://github.com/app2smile/rules/blob/master/js/spotify-lyric.js) is a Chinese repo that manipulates Spotify to translate the result to Chinese. **Describe the solution you'd like** I did not see any tracks on the official Spotify app that has the translation. However, I modified my requests according to the mentioned script and I managed to see the feature that is something like this (on iOS): <img src="https://github.com/librespot-org/librespot/assets/39065975/5c369b5a-b76c-4d51-9411-19e26e033013" width="45%" /> <img src="https://github.com/librespot-org/librespot/assets/39065975/84af1950-471d-496b-ba21-8fbb23e71717" width="45%" /> **Additional context** By the way, I did not find any .proto files related to lyrics. Could you please help me to locate that files?
Author
Owner

@roderickvd commented on GitHub (Mar 31, 2024):

Great! Could you open a PR to document that?

I don't remember where I got the lyrics struct from. Maybe deserialising the JSON, I think that was it.

<!-- gh-comment-id:2028619376 --> @roderickvd commented on GitHub (Mar 31, 2024): Great! Could you open a PR to document that? I don't remember where I got the lyrics struct from. Maybe deserialising the JSON, I think that was it.
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/librespot#579
No description provided.