Skip to content

Add synchronized lyrics support via LRCLib API #126

@kqnori

Description

@kqnori

All this description is ai generated i just added it to make sure to provide what i want (i didnt read it )

Feature Request: Synchronized Lyrics Support
Summary

Add support for displaying synchronized lyrics in ytermusic by integrating with the LRCLib API.
Motivation

Synchronized lyrics enhance the music listening experience by allowing users to follow along with the song in real-time. LRCLib provides a free, open API that offers both synced and unsynced lyrics for a wide variety of tracks.


Proposed Implementation

Integrate with the
[LRCLib API](https://lrclib.net/docs)
to fetch synchronized lyrics

Display lyrics in the TUI interface, synchronized with the current playback position

Cache downloaded .lrc files locally to reduce API calls and enable offline lyrics viewing

Add a keyboard shortcut to toggle lyrics view (e.g., l key)

Fall back to unsynced lyrics if synced lyrics are unavailable

Similar Implementations

Other music players have successfully integrated LRCLib:

Namida supports LRCLib for YouTube videos

SPRT (Spotify CLI) uses LRCLib for synced lyrics

Various other players have added LRCLib support due to its free and reliable API

Benefits

Enhances user experience without compromising the lightweight nature of ytermusic

LRCLib API is free and doesn't require authentication

Lyrics files are small and fit well with ytermusic's caching architecture

Maintains privacy focus as LRCLib is community-driven and open

Optional Configuration

Add configuration options in the config file:

text
enable_lyrics: true
auto_fetch_lyrics: true
lyrics_display_position: "right" # or "bottom"

Thank you for considering this feature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions