凤希AI - 单音频处理器
Cut the audio to match the video segment — loudness, sample rate, and stereo in one pass
- 分段时长列表
- 原始音频
- 剪切音频
- 生成帧数
FxAiSingleAudioProc ("凤希AI - 单音频处理器") is the pack's audio segment slicer. You give it one long audio track plus the same segment-durations list the video side uses, and it cuts the piece of audio that belongs to the current segment - while normalizing loudness, resampling, forcing stereo, and reporting the frame count that matches. In a segmented long-video pipeline, this is the node that keeps the sound from drifting out of sync with the picture.
What it's actually for
When you generate a video in segments, each segment gets its own audio slice, and every slice has to line up with the frames you generated for that segment. This node is the bridge between the two: it computes the exact sample range for segment i, and hands back a 生成帧数 that should agree with what FxAiSegmentTotalFrames calculated for the same segment. If both nodes get the same durations list and the same 帧率, they agree - and your audio and video stay locked together across every cut.
It also does the normalization grunt work that keeps a multi-segment soundtrack from sounding like it was recorded by four different people:
- 统一音量强度 (1–100, default 50) normalizes the slice's RMS loudness so segments don't jump between quiet and loud.
- 目标采样率Hz (44100/48000) resamples if needed, via
torchaudio. - 强制双声道 duplicates mono to stereo so every segment is a consistent channel layout for the final mux.
- 目标比特率kbps (128–384, default 128) gets attached as a bitrate marker that the pack's renderers use when exporting.
The inputs and outputs that matter
The ones a beginner actually touches:
- 原始音频 - the AUDIO socket, wired from any audio source node.
- 分段时长列表 - the same LIST of segment durations you feed the video side. Keep them identical.
- 当前索引 - which segment you're slicing.
- 音频开始时长 - FLOAT, default 0. Prepends that many seconds of silence, handy when the storyboard has a lead-in before the track starts.
- 过渡帧数 - default 1, the same transition-frame convention as the video generators.
Outputs:
- 剪切音频 - AUDIO, the processed slice, ready for the video generator or a merge step.
- 生成帧数 - INT, the aligned frame count for this segment. Wire it to your frame count inputs.
The trap
The node pads the slice to at least the segment's duration if the audio runs short, and it applies loudness gain from the current slice's RMS - so a very quiet track can get boosted hard, and a clipped one can stay hot. If your segments come out inconsistent, check the source audio's headroom first, then adjust 统一音量强度. It's a loudness match, not a loudness master.
Install
Standard pack install - it's part of fxai-toolkit:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
Restart ComfyUI, or use ComfyUI Manager and search "fxai-toolkit". This node pulls in torchaudio (which normally rides along with your PyTorch install) and the pack's auto-installed soundfile. No model files to download.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| 帧率 | INT | 24 | — |
| 当前索引 | INT | 0 | — |
| 帧数对齐基数 | INT | 8 | — |
| 过渡帧数 | INT | 1 | — |
| 统一音量强度 | INT | 501–100 | — |
| 目标比特率kbps | COMBO | 128kbps | 5 options: 128kbps, 192kbps, 256kbps, 320kbps, 384kbps |
| 目标采样率Hz | COMBO | 44100Hz | 2 options: 44100Hz, 48000Hz |
| 强制双声道 | BOOLEAN | true | — |
| 分段时长列表 | LIST | — | |
| 原始音频 | AUDIO | — | |
| 音频开始时长 | FLOAT | 0.00 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 剪切音频 | AUDIO | — |
| 生成帧数 | INT | — |