LiveLyrics is a lightweight Python utility for Windows that keeps your Discord custom status in perfect sync with whatever song you’re currently playing. As each lyric line arrives, LiveLyrics fetches the timestamped lyrics, tracks the exact playback position, and patches your Discord status in real time — all in the background with a single script. It’s built for music lovers who want their Discord presence to reflect what they’re actually listening to, line by line.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/x-eon-max/LiveLyrics/llms.txt
Use this file to discover all available pages before exploring further.
Overview
LiveLyrics is built on three cooperating pillars that work together every loop iteration: Windows SDK media session — The script useswinsdk (winsdk.windows.media.control.GlobalSystemMediaTransportControlsSessionManager) to interrogate the operating system’s Global System Media Transport Controls. From the active session it reads the current track title, artist name, playback status, and the raw playback position reported by the OS. Because the OS position timestamp can lag slightly behind real audio playback, LiveLyrics extrapolates the true position forward from the last_updated_time value whenever the track is actively playing (playback status 4).
LRCLIB API — Once a track is identified, LiveLyrics queries lrclib.net with the track name and artist. LRCLIB returns synced lyrics in the standard .lrc format — each line prefixed with a [MM:SS.ms] timestamp. LiveLyrics parses these timestamps down to millisecond precision and builds a sorted list of (seconds, text) pairs. If LRCLIB returns no synced lyrics for a track, the script falls back gracefully rather than showing nothing.
Discord status PATCH — With the correct lyric line in hand, LiveLyrics calls PATCH https://discord.com/api/v9/users/@me/settings with your user token, setting custom_status to the current lyric text and the 🎵 emoji. Only changed lines trigger a new request, keeping Discord API calls to a minimum.
Key Features
Temporal Extrapolation
The OS-reported playback position can lag behind real audio. LiveLyrics compensates by adding the elapsed wall-clock time since the last position update, keeping displayed lyrics tightly aligned with what you’re actually hearing.
In-Memory Lyrics Cache
Parsed lyrics are stored in a
LYRICS_CACHE dictionary keyed by (title, artist). Replaying a track — or navigating back to it — never triggers a redundant LRCLIB request, saving bandwidth and latency.Artist – Title Fallback
When LRCLIB has no synced lyrics for the current track, LiveLyrics automatically sets your Discord status to
"Artist - Title" so your presence always shows something meaningful rather than going blank.Millisecond-Precise LRC Parsing
The
.lrc timestamp parser handles both two- and three-digit fractional seconds ([MM:SS.ff] and [MM:SS.fff]), padding shorter fractions to three digits before conversion so no precision is lost.Requirements
- Operating System: Windows 10 or Windows 11
- Python: 3.8 or newer
- Pip packages:
requests,winsdk - Discord account: a Discord user token (not a bot token) with permission to update your own custom status