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.
EnhancedLrcExporter serializes a SyncedLyrics object into the Enhanced LRC format — a plain-text .lrc extension that embeds per-syllable <mm:ss.xxx> timestamps alongside the traditional [mm:ss.xxx] line timestamps. It preserves background vocal tracks, translation lines, and full word-level timing, making it the right choice whenever the richness of KaraokeLine data must survive the round-trip.
Signature
EnhancedLrcExporter is a Kotlin object (singleton) that implements ILyricsExporter:
SyncedLyrics instance; receive a fully-formed Enhanced LRC string. If lyrics.lines is empty, the method returns an empty string immediately.
Usage
Output structure
The exported string follows this layout:- ID3 tags — emitted first when metadata is present.
- Lyric lines — one entry per line in
SyncedLyrics.lines, formatted according to the line type. - Translation lines — immediately after their primary line, sharing the same line-level timestamp.
- Background vocal lines —
[bg:...]entries written after their parent main line.
ID3 tags
| Tag | Source field | Condition |
|---|---|---|
[ti:...] | SyncedLyrics.title | Emitted when title is not blank |
[ar:...] | SyncedLyrics.artists | Emitted when the list is non-null, non-empty, and every artist name is non-blank; multiple artists joined with / |
KaraokeLine — syllable output
EachKaraokeLine is serialized with inline syllable timestamps:
[mm:ss.xxx] tag comes from KaraokeLine.start. The syllable chain begins at the first syllable’s start time and closes with a trailing <mm:ss.xxx> tag equal to KaraokeLine.end. For example:
SyncedLine — plain output
ASyncedLine (no syllable data) is written in standard LRC style with no inline timestamps:
Translation lines
When a line’stranslation is non-null, a second line is appended with the same line-level timestamp as the primary line:
Background vocal lines ([bg:...])
Background vocals stored as AccompanimentKaraokeLine entries on a KaraokeLine.MainKaraokeLine are written immediately after the main line using the [bg:...] wrapper:
[bg:...] translation entry follows:
Full example
Round-trip fidelity
When to use EnhancedLrcExporter
- You need word-level karaoke highlighting in a downstream player that supports Enhanced LRC.
- You want to preserve background vocal tracks in a portable plain-text format.
- You are converting from TTML or KRC and need to retain syllable timing without moving to XML.
For the widest media-player compatibility at the cost of syllable detail, use
LrcExporter. For an Apple Music–compatible XML document with multi-voice support, use TTMLExporter.