Accompanist Lyrics Core ships three ready-to-use exporters that convert aDocumentation 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.
SyncedLyrics object back into a serialized string. Whether you need the widest media-player compatibility, syllable-level karaoke data, or an Apple Music–compatible XML document, there is an exporter that fits the job — and all three share an identical one-line calling convention.
The ILyricsExporter interface
Every exporter implements the same interface:
SyncedLyrics object in, receive a formatted string out. There are no configuration objects, builder patterns, or checked exceptions to worry about.
All three exporters —
LrcExporter, EnhancedLrcExporter, and TTMLExporter — are Kotlin object singletons. You never instantiate them; just call export directly on the object reference.Available exporters
| Exporter | Output format | Syllable timing | Background vocals | Multi-voice |
|---|---|---|---|---|
LrcExporter | Standard LRC | ✗ | ✗ | ✗ |
EnhancedLrcExporter | Enhanced LRC | ✓ | ✓ | ✗ |
TTMLExporter | TTML XML | ✓ | ✓ | ✓ |
Basic usage
Because every exporter is a singleton, calling any of them takes a single line:lyrics.lines is empty, all exporters return an empty string rather than a partially-formed document.
Choosing the right exporter
UseLrcExporter when you need the broadest compatibility. Virtually every media player and lyrics app understands standard LRC. The trade-off is that syllable timing is lost: any KaraokeLine in the source is downsampled to a plain SyncedLine before serialization.
Use EnhancedLrcExporter when syllable-level karaoke data and background vocal tracks must be preserved. The output is still a plain-text .lrc file, so it stays human-readable, but the <mm:ss.xxx> inline timestamps carry full word-level timing.
Use TTMLExporter when targeting Apple Music or any pipeline that consumes TTML XML. It supports multi-voice songs (two agents, v1 / v2), background-vocal spans, and translation metadata — all in a single structured document.
Format-conversion pipeline
The exporters compose naturally with any of the library’s parsers. The snippet below reads an Apple Music TTML file and writes it back out as a standard LRC file, dropping syllable detail in the process:LrcExporter for EnhancedLrcExporter or TTMLExporter to target a different output format without changing anything else.
Exporter pages
LRC Exporter
Standard LRC with ID3 tags and line-level timestamps — maximum compatibility
Enhanced LRC Exporter
Syllable timing, background vocal lines, and translation support
TTML Exporter
Apple Music TTML XML with multi-voice agents and translation spans