Usage¶
Parsing Lyrics¶
The easiest way to parse lyrics is using AutoParser.
val lrcContent = "[00:00.00]Hello World"
val lyrics: SyncedLyrics = AutoParser.parse(lrcContent)
// Access lines
lyrics.lines.forEach { line ->
println("${line.start} - ${line.content}")
}
// Check for Karaoke data
if (lyrics.lines.first() is KaraokeLine) {
// Handle syllable data
}
If you know the format explicitly, you can use specific parsers:
Exporting Lyrics¶
To convert a SyncedLyrics object back to a string:
Creating Lyrics Manually¶
You can also construct SyncedLyrics programmatically (see Architecture for model details).