LRC files can carry a small set of metadata tags at the top of the file. Accompanist Lyrics Core parses these into two data classes: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.
Attributes, which holds the song-level metadata fields, and Artist, which represents a single credited performer. While Attributes is produced internally by the parser’s metadata helper, its values are surfaced directly on SyncedLyrics — you access the title through lyrics.title and the artist list through lyrics.artists.
Attributes
Attributes maps the five standard LRC metadata tags to typed Kotlin properties. Every field is nullable and defaults to null, since any tag may be absent in a given file.
Constructor parameters
The raw artist string from the
[ar:] tag. When the file contains multiple artists they are represented as separate Artist objects on SyncedLyrics.artists rather than concatenated here.Album name from the
[al:] tag. null when the tag is absent.Song title from the
[ti:] tag. On SyncedLyrics this surfaces as the non-nullable title property (empty string when absent).Global timing offset in milliseconds from the
[offset:] tag. A positive value shifts all timestamps later; a negative value shifts them earlier. null when the tag is absent (no adjustment applied).Total song duration in milliseconds from the
[length:] tag. null when the tag is absent.Properties
Raw artist string from
[ar:]. null if not present in the file.Album name from
[al:]. null if not present.Song title from
[ti:]. null if not present.Global timestamp offset in milliseconds from
[offset:]. null when absent.Total duration in milliseconds from
[length:]. null when absent.LRC tag mapping
| LRC tag | Attributes field | Type |
|---|---|---|
[ti:Song Title] | title | String? |
[ar:Artist Name] | artist | String? |
[al:Album Name] | album | String? |
[offset:200] | offset | Int? (ms) |
[length:210000] | duration | Int? (ms) |
Relationship to SyncedLyrics
Attributes is an internal type produced by the parser. After parsing, its values are promoted directly onto the SyncedLyrics object:
Attributes.title→SyncedLyrics.title(non-nullable; empty string when absent)Attributes.artist→SyncedLyrics.artists(parsed into aList<Artist>)
Attributes directly when consuming a fully parsed SyncedLyrics.
Artist
Artist represents a single credited performer on a track. The artists list on SyncedLyrics contains one Artist per credited name.
Constructor parameters
The role or category of the artist (e.g.
"main", "featured", "ar"). The exact vocabulary depends on the source format — for standard LRC the type reflects the tag name used.The display name of the artist (e.g.
"Taylor Swift").Properties
The artist role or category string.
The artist display name.
Usage examples
Accessing metadata from SyncedLyrics
Guarding against absent artist info
Example LRC file and resulting model
The
offset and duration values from Attributes are consumed by the parser during processing. After parsing, the offset has already been applied to all line timestamps — there is no separate offset field on SyncedLyrics.