Nodes/comfyui_lyric_align/Lyric Patch Transcript
ComfyUI Node

Lyric Patch Transcript

Whisper heard it wrong — this node fixes the transcript against lyrics you already have, no audio run needed

By bmad4ever·Created 2 days ago·Updated about 18 hours ago· 0
Lyric Patch Transcript
    • text
    • report
    • diff
    transcript
    lyrics
    min_score55

    You already transcribed the clip, the transcript is full of mishears, and you don't want to burn another pass through a model to fix it. LyricPatchTranscript repairs a noisy transcript against your known-good lyric sheet using fuzzy text matching only. No audio in, no model in, instant. Feed it transcript + lyrics, get back the real lines plus a report of exactly what was wrong.

    This is the text route of the comfyui_lyric_align pack, and it's the one to reach for when you have a transcript already and just want it cleaned up.

    How it works

    Two stages, and the second one is the part that makes it trustworthy. First, rapidfuzz's partial_ratio_alignment finds roughly where in the lyric sheet your transcript sits - a character-level span. Then a word-level diff trims that span down to only the lines that actually earned it: a line is kept only if at least one of its words matched the transcript. That second stage matters more than it sounds. The raw character span routinely runs past the real ending - it stops wherever edit distance stops improving, which can be several words into the next line - and expanding that to whole lines hands you lyrics the clip never sang. The author's own test clip spuriously appended the chorus until the word-evidence trim fixed it.

    Inputs

    • transcript (STRING): the noisy ASR output to repair.
    • lyrics (STRING): the ground-truth sheet to match against.
    • min_score (FLOAT, default 55): below this partial-match score, the transcript is passed through untouched. That refusal is designed, not a bug. A confidently-wrong "fix" is worse than no fix, so the node would rather hand you the noisy original than a section you never sang. Drop it toward 20 if your audio is badly garbled and you want it to try harder - the report will tell you when it's scraping by.

    Outputs

    • text: the patched real lines. Wire into SaveText or whatever consumes it.
    • report: JSON with matched, the score, which lyric lines matched, words heard vs. truth, and the mismatch count. It says so explicitly when it refused.
    • diff: human-readable lines showing what was heard versus the truth - the heard 'their' truth 'there' style breakdown.

    The honest caveat

    It matches on text alone, so a repeated chorus can match the wrong copy. No audio means no way to tell which chorus you were in. If that ambiguity would sink your use case, the audio route (LyricForcedAlign + LyricSliceByTime) has no such problem - time decides there.

    Install and where it fits

    Same pack as the rest: ComfyUI Manager search "comfyui_lyric_align", or clone into custom_nodes and restart. Of all five nodes, this is the only one that needs nothing beyond rapidfuzz - no torchaudio, and crucially no 1.18 GB model download. The pack installs both dependencies regardless, but the big checkpoint only downloads on your first align, so transcript patching alone never triggers it.

    In a workflow it plugs straight onto a Whisper node's text output - the pack's showcase uses trentnodes' TranscribeLyrics - with your lyric sheet on the other side. One run, and your garbage transcript becomes the real lines.

    Categoryaudio/lyrics

    Inputs (3)

    NameTypeDefaultDescription
    transcriptSTRINGThe noisy ASR output to repair.
    lyricsSTRINGGround-truth lyric sheet to match against.
    min_scoreoptFLOAT550–100Below this partial-match score the transcript is passed through untouched rather than replaced with a wrong section.

    Outputs (3)

    NameTypeDescription
    textSTRING
    reportSTRING
    diffSTRING