FireRedAudio 局部修复回填 A/B · T8star-Aix
Splice a repaired line back in — and be able to prove you did it right
- repair_plan
- edited_clip
- 原版 A
- 修复版 B
- 替换审计报告
The local-repair chain has three steps: cut a bad region out, fix it, put it back. LocalRepairRange does the cutting and hands you the plan; an edit node (semantic SpeechEdit or AcousticEdit) fixes the clip; T8_FireRedAudio_LocalRepairApply does the putting back - with a SHA-256 check on the source, an equal-power crossfade at the seams, and an A/B pair you can audition side by side. If you've ever hand-spliced audio in a DAW and prayed the seam wouldn't click, this is that, without the prayer.
What it does
Three inputs: repair_plan (the immutable plan from LocalRepairRange - it carries the source path, the exact frame range to replace, and the source's SHA-256), the edited_clip (the repaired audio from your edit node), and crossfade_ms (default 40) for the edge blend.
The node verifies the source file's hash matches what the plan recorded - if the original was moved or modified, it errors rather than splicing into the wrong audio. It then resamples/adapts the edited clip to the source's channel count and sample rate (your edit came out of a worker that may have produced mono 24kHz; the source might be stereo 48kHz), and writes the replacement with equal-power crossfades inside the replace region. The source file is never overwritten; you get two outputs - the untouched original (original_audio A) and the repaired version (B) - so you can A/B listen, and a replacement report that records the SHA-256s and, importantly, any change in clip duration.
That duration honesty is a detail worth calling out: if your edit came out longer or shorter than the hole it's filling, the report says so explicitly. The node doesn't silently time-stretch the edit to fit - you'd hear the lie later, and it refuses to hide it from you now.
Inputs and outputs that matter
repair_plan- required, fromLocalRepairRange. Don't hand-build this; the plan carries the hashes and frame math.edited_clip- required, the output of your edit node.crossfade_ms- the only knob, 0 to disable.- Outputs:
original_audio(A),repaired_audio(B),replacement_report.
Wire A and B into a compare/save node and listen before you commit to the B side in delivery.
Install
Pack install:
cd ComfyUI\custom_nodes
git clone https://github.com/T8mars/comfyui-fireredaudio-T8.git
cd comfyui-fireredaudio-T8
python scripts\setup_runtime.py
No model needed here - the model was spent by the upstream edit node. This is pure audio-domain math plus bookkeeping.
Gotchas
The SHA-256 verification is not optional theater: if LocalRepairRange was run on an older copy of the source, or you moved the file, the apply step will refuse. That's correct behavior - splice into the wrong file and you'd never notice until delivery. If it errors, re-run LocalRepairRange on the current source and rebuild the plan. And the crossfade default of 40ms is tuned for speech seams; if you hear a click at the boundaries, nudge it up rather than down - clicks at replace edges usually mean the blend is too short for your edit's phase, not too long.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| repair_plan | T8_FIREREDAUDIO_LOCAL_REPAIR_PLAN | — | |
| edited_clip | AUDIO | — | |
| crossfade_ms | INT | 400–2000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 原版 A | AUDIO | — |
| 修复版 B | AUDIO | — |
| 替换审计报告 | STRING | — |