Accompanist Lyrics Core is a pure Kotlin library that parses lyrics files into a rich, unified data model and exports them back to any supported format. It supports syllable-level timing for karaoke highlighting, dual-language translation lines, background vocal tracks, and phonetic annotations — all without any Android or platform-specific dependencies.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.
Installation
Add the library to your Gradle project and configure your build
Quickstart
Parse your first lyrics file and access lines in minutes
Parsers
Explore all supported formats: LRC, TTML, Lyricify, Kugou, and more
API Reference
Full reference for every class, interface, and extension function
Why Accompanist Lyrics Core?
Most lyrics libraries stop at line-level timestamps. Accompanist goes further — every parser produces aSyncedLyrics object that carries syllable-level timing (KaraokeLine), per-line translations, background vocal tracks, and phonetic (romanization) annotations. The same model works whether you parsed an Apple Music TTML file or a plain .lrc file.
Auto-Detection
AutoParser identifies the format automatically — no manual format sniffing requiredKaraoke-Ready
Syllable-level timing with
progress() helpers ready for real-time UI highlightingMultiplatform
Targets JVM, JS, Wasm/JS, iOS, and macOS — one library for every Kotlin platform
Extensible
Implement
ILyricsParser to add any custom format and register it with AutoParserExport Support
Convert between formats: parse TTML and export back to LRC or Enhanced LRC
Translation Lines
Native dual-language support pairs a translation line with its primary line automatically
Supported Formats
| Format | Parser | Notes |
|---|---|---|
| Standard LRC | EnhancedLrcParser | Line-level timestamps, ID3 metadata |
| Enhanced LRC | EnhancedLrcParser | Syllable timing, background vocals |
| TTML (Apple Syllable) | TTMLParser | Apple Music format, phonetic transliterations |
| Lyricify Syllable | LyricifySyllableParser | Lyricify App format |
| Kugou KRC | KugouKrcParser | Kugou Music format with phonetics |
Get Started
Add the dependency
Add
com.mocharealm.accompanist:lyrics-core to your build.gradle.kts dependencies block.Access the data
Iterate over
SyncedLyrics.lines to get SyncedLine or KaraokeLine objects with timing data.