Package-level declarations
Types
How instrumental lines are added between sung ones.
The LyricParser for LRC, plain and enhanced. It cleans up the timing after parseLRC; see there.
The lyrics formats this package reads.
Song-level credits a lyrics file carries alongside its lines.
A parser for one lyrics format. detectParser picks the right one for a document.
What parseTTMLContent reads from a TTML document.
Options for parseTTMLContent.
The LyricParser for text without timing: a lyric per line of text, all at 0.
Song metadata, used to drop opening lines that only echo the title or the artist.
The LyricParser for QQ Music's QRC, see parseQRC.
The LyricParser for SRT subtitles: a lyric per cue.
The LyricParser for TTML, see parseTTMLContent.
Functions
Which format input is in. TTML is tried first, then LRC, SRT and QRC; anything else is LyricFormat.PLAIN.
The parser for input's format, as detectFormat tells it. Never fails: text in no known format is read as plain lyrics, a line per line of text.
Turn the silences between lines into explicit instrumental lyrics, so a renderer has something to show during an intro, a solo or an outro instead of holding the last sung line on screen.
Evens out the word timing of enhanced LRC in place, as Kugou's and Musixmatch's need: a space timed like the word before it gives its time to that word, and when most words last 100 ms or less, each short word is held until the next one starts (no longer than its line). LRCParser runs it after parseLRC; call it yourself only for such sources, since clean timings would be changed too.
The singers' names, by the agent ids lines carry once parsed (v1, v2, …, v1000 for a group), as the document's head gives them (<ttm:agent xml:id="…" type="person"><ttm:name>…</ttm:name>). Not upstream, which reads no names: for a host that shows who sings. Agents without a name are left out.
Parses a TTML document (Apple Music's, and the community formats built on it): lines, word or syllable timing, background vocals, singers, translations and romanizations. TTMLParser calls this with the default options; call it directly for the song's duration or another gap threshold.