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.
ILyricsExporter is the interface every lyrics exporter implements. It exposes a single export method that takes a parsed SyncedLyrics object and serialises it into a target string format such as LRC, Enhanced LRC, or TTML. Implementing this interface is the standard way to add export support for any custom lyrics format.
Interface definition
Methods
export
SyncedLyrics object into a string representation of the target format.
The parsed lyrics data to export. Contains a list of
ISyncedLine entries (either SyncedLine or KaraokeLine) along with optional metadata such as title and artists.String containing the full serialised lyrics in the target format, ready to be written to a file or transmitted over a network.
Built-in exporters
All built-in exporters areobject singletons — no instantiation is needed.
LrcExporter
Exports to standard LRC with line-level timestamps. Drops syllable timing data.
EnhancedLrcExporter
Exports to Enhanced LRC with
<mm:ss.xx> syllable timestamps and background vocal blocks.TTMLExporter
Exports to TTML/Apple Music XML, preserving syllable timing, phonetics, and span attributes.
Implementing a custom exporter
ImplementILyricsExporter as an object when your exporter holds no state, or as a class when it needs configuration.
Handling line types
ASyncedLyrics.lines list contains entries of type ISyncedLine. The two concrete types are SyncedLine (plain timed text) and KaraokeLine (syllable-timed). Use a when block to handle both:
Including metadata
SyncedLyrics carries optional metadata you can embed in format headers:
Using an exporter
See also
- Exporters overview — comparison of all built-in exporters
- SyncedLyrics — the data model passed to
export() - ILyricsParser — the complementary parser interface