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.
LrcExporter serializes a SyncedLyrics object into the standard LRC format — plain-text, line-level timestamps, and optional ID3 metadata tags. It is the right choice whenever maximum compatibility with media players and lyrics apps matters more than preserving syllable-level karaoke data.
Signature
LrcExporter is a Kotlin object (singleton) that implements ILyricsExporter:
SyncedLyrics instance; receive a fully-formed 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 if the corresponding metadata is non-blank.
- Lyric lines — one
[mm:ss.xxx]textline per entry inSyncedLyrics.lines. - Translation lines — immediately after their primary line, sharing the same timestamp.
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 / |
Timestamps
Each line’s timestamp uses[mm:ss.xxx] notation derived from SyncedLine.start (milliseconds).
Translation lines
When aSyncedLine carries a non-null translation string, LrcExporter writes a second line with the same timestamp immediately below the primary line. This mirrors the convention used by many LRC editors and streaming services.
KaraokeLine downsampling
The conversion merges all syllable content into a singlecontent string and retains only the line-level start and end times.
Full example
When to use LrcExporter
- You need the output to play in any media player or lyrics app without special support.
- The source lyrics use only line-level timing (i.e.
SyncedLineobjects with no syllable data). - You are converting from a richer format (TTML, Enhanced LRC) and syllable detail is not required downstream.
For syllable-level karaoke output that stays in plain-text LRC, use
EnhancedLrcExporter. For an Apple Music–compatible XML document, use TTMLExporter.