Skip to main content

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.

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.

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 a SyncedLyrics 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 required

Karaoke-Ready

Syllable-level timing with progress() helpers ready for real-time UI highlighting

Multiplatform

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 AutoParser

Export 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

FormatParserNotes
Standard LRCEnhancedLrcParserLine-level timestamps, ID3 metadata
Enhanced LRCEnhancedLrcParserSyllable timing, background vocals
TTML (Apple Syllable)TTMLParserApple Music format, phonetic transliterations
Lyricify SyllableLyricifySyllableParserLyricify App format
Kugou KRCKugouKrcParserKugou Music format with phonetics

Get Started

1

Add the dependency

Add com.mocharealm.accompanist:lyrics-core to your build.gradle.kts dependencies block.
2

Parse lyrics

Create an AutoParser instance and call .parse(content) with your lyrics string.
3

Access the data

Iterate over SyncedLyrics.lines to get SyncedLine or KaraokeLine objects with timing data.
4

Export if needed

Use LrcExporter, EnhancedLrcExporter, or TTMLExporter to convert to another format.

Build docs developers (and LLMs) love