Skip to main content

render_synced_lrc

Function render_synced_lrc 

Source
pub fn render_synced_lrc(
    clip: &Clip,
    lineage: &LineageContext,
    aligned: &AlignedLyrics,
) -> Option<String>
Expand description

Render a synced (timed) .lrc sidecar for clip from Suno’s aligned lyrics, or None when there is nothing to time (an instrumental).

The header block is identical to the untimed render_clip_lrc; the body is the line-level form from AlignedLyrics::lrc_body: one [mm:ss.xx] stamp per aligned line, followed by the line text. This is the universally supported LRC form, so every player syncs it cleanly (word-level timing is carried in the MP3 SYLT frame, not inline in the .lrc). Returns None when aligned yields no timed lines, so an instrumental writes no .lrc.