Accompanist Lyrics Core ships with parsers for every major lyrics file format used by modern music streaming services and karaoke applications. Each parser implements a common interface so they are interchangeable, and anDocumentation 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.
AutoParser ties them all together for effortless format detection.
The ILyricsParser interface
Every parser in the library implements ILyricsParser, which defines three methods:
Returns
true if this parser recognises the format of the given content string. Used by AutoParser to pick the right parser automatically.Parses a pre-split list of lines. The default implementation joins the list with
\n and delegates to the String overload.Parses a raw string of lyrics content. The default implementation splits on
\n and delegates to the List overload.SyncedLyrics object whose lines list contains a mix of SyncedLine and KaraokeLine instances depending on how much timing detail the format carries.
Available parsers
| Format | Class | How it is detected |
|---|---|---|
| Standard LRC | EnhancedLrcParser | Presence of [dd:dd.dd] timestamp pattern |
| Enhanced LRC (syllable) | EnhancedLrcParser | Same detection; syllable brackets activate karaoke output |
| TTML (Apple Music) | TTMLParser | Presence of http://www.w3.org/ns/ttml in content |
| Lyricify Syllable | LyricifySyllableParser | Pattern [a-zA-Z]+\s*\(\d+,\d+\) |
| Kugou KRC | KugouKrcParser | Line time [\d+,\d+] combined with word time <\d+,\d+,\d+> |
EnhancedLrcParser handles both standard LRC (line-level timing only) and Enhanced LRC (syllable-level timing). The parser automatically produces SyncedLine or KaraokeLine output based on the content it finds.Recommended usage
For most applications you should reach forAutoParser. It tries each registered parser in order and delegates to the first one that claims it can handle the content:
PhoneticProvider, and registering custom parsers.
Detection order in AutoParser
AutoParser iterates its parser list and calls canParse on each entry. The first match wins. The default order is:
TTMLParserLyricifySyllableParserEnhancedLrcParserKugouKrcParser
word(start,duration) notation would not be mistaken for standard LRC timestamps, but the reverse could theoretically overlap on edge-case files.
Individual parser pages
AutoParser
Automatic format detection and delegation. The right starting point for all new integrations.
LRC
Standard LRC with line-level timestamps and ID3-style metadata tags.
Enhanced LRC
Enhanced LRC with syllable timing, voice tags, and background vocal lines.
TTML
Apple Music TTML with syllable spans, transliterations, and multi-agent voices.
Lyricify Syllable
Lyricify App format with
(startMs, durationMs) syllable notation and alignment codes.Kugou KRC
Kugou Music KRC with line/word timestamps, embedded phonetics, and colon role markers.