Skip to main content
Version: v3.0.0 (current)

NormalizedLyrics

Since 3.0.0.

Returned by Node.getLyrics, Player.fetchCurrentLyrics, and LyricsUtils. An empty result is null, not an object with empty lines.

Definition​

export interface NormalizedLyrics {
/** The source that found the lyrics, for example "spotify", "deezer" or "LRCLIB". */
sourceName: string | null;
/** The lyrics provider, for example "MusixMatch" or "LRCLIB". */
provider: string | null;
/** The plain text, when the source sends it. */
text: string | null;
/** True when every line has a timestamp and the timestamps are not all 0. */
synced: boolean;
/** The lines, in order. */
lines: NormalizedLyricsLine[];
/** The backend that answered. */
origin: "lavalink" | "nodelink" | "lrclib";
}
FieldMeaning
sourceNameSource that found the lyrics, such as spotify, deezer, or LRCLIB; null when absent.
providerProvider name, such as MusixMatch or LRCLIB; null when absent.
textPlain text supplied by the source, or null. Not synthesized by joining lines.
syncedComputed timing state, not merely a provider's synced: true hint.
linesNormalizedLyricsLine entries, with milliseconds for timing.
originBackend that answered; independent of the source/provider names.

Synchronization​

synced is true only when a provider hint is not explicitly false, there are at least two lines, every line has a finite numeric timestamp, and at least one timestamp is greater than zero. A true hint alone is insufficient. Missing or non-finite raw timing becomes null before this check.

Synced lines are sorted by timestamp. Unsynced lines retain their order and have both timestamp and duration set to null, including all-zero timing and single-line results. Text is trimmed and carriage returns removed. Empty strings are retained as verse breaks, but a result without any nonempty line is null.