Enhanced LRC extends the standard LRC format by embedding per-syllable timestamps inside each lyric line. This enables word-by-word highlighting, multi-singer support, and background vocal tracks—all features required for karaoke display.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/6xingyv/accompanist-lyrics-core/llms.txt
Use this file to discover all available pages before exploring further.
EnhancedLrcParser handles standard and Enhanced LRC with the same object, automatically choosing between SyncedLine and KaraokeLine output based on what it finds in each line.
Format
Angle-bracket syllable timing (recommended)
Syllable start times are expressed with<mm:ss.xx> angle brackets immediately before each syllable. The line-level timestamp [mm:ss.xx] still opens the line:
<time>text pair becomes a KaraokeSyllable.
Square-bracket syllable timing (legacy)
Some older tools write syllable timestamps inside square brackets. This is also supported:Background vocal lines
Background or accompaniment lines are prefixed with[bg: instead of a timestamp. The background syllables are parsed just like main syllables and then attached to the immediately preceding MainKaraokeLine.accompanimentLines:
Voice and alignment tags
Av1: or v2: prefix after the line timestamp assigns the line to a singer, which controls horizontal alignment in dual-singer UIs:
| Prefix | KaraokeAlignment value |
|---|---|
v1: | KaraokeAlignment.Start |
v2: | KaraokeAlignment.End |
| (none) | KaraokeAlignment.Unspecified |
Translation lines
Like standard LRC, a translation is encoded as a second line sharing the same timestamp. The parser matches any two lines whose start times are within 150 ms of each other and whose text content differs, merging the second into thetranslation field:
Detection
EnhancedLrcParser is detected—and therefore also handles standard LRC—by the presence of a [dd:dd.dd] pattern. There is no separate detection step for the syllable extensions; the parser always attempts syllable parsing and falls back to SyncedLine when no syllable brackets are found.
Usage
EnhancedLrcParser is a Kotlin object—no instantiation is needed:
Working with the result
Lines will be a mixture ofKaraokeLine.MainKaraokeLine (when syllable timing is present) and SyncedLine (when only a line-level timestamp exists):
Full example with background vocals
Background lines are not returned as top-level entries in
SyncedLyrics.lines. They are attached to the MainKaraokeLine that immediately precedes them via accompanimentLines. If no preceding main line exists, the background line is added to the top-level list as a standalone AccompanimentKaraokeLine.Metadata
EnhancedLrcParser forwards the same LRC header tags as the standard parser. SyncedLyrics.title and SyncedLyrics.artists are populated from [ti:] and [ar:] tags respectively. See the LRC page for full metadata tag details.