Nodes/fxai-toolkit/凤希AI - 音频管理器 - 音频加载
ComfyUI Node

凤希AI - 音频管理器 - 音频加载

The audio loader that plays nice with ComfyUI loops

By fxai666·Created 4 months ago·Updated 4 days ago· 35
凤希AI - 音频管理器 - 音频加载
    • 音频
    • 采样率
    • 当前音频路径
    • 总音频数量
    音频文件夹路径
    音频索引0
    起始秒数0.000
    截取时长秒数0.000

    FxAiLoadAudioByIndex (凤希AI - 音频管理器 - 音频加载) is the part of the fxai-toolkit audio manager that makes "one node, many audio files" workflows possible. Instead of hard-wiring a single file into your graph, you give it a folder and an index and it loads whatever audio is at that position - then hands you the total count and the current path so you can loop over the whole batch without touching the graph. For multi-shot or multi-segment video work, that's the difference between copying the same node twenty times and writing a loop once.

    Mechanically it's simple and predictable. It scans the folder, filters to audio extensions (.wav, .mp3, .flac, .ogg, .m4a, .aac, .wma, .ac3), sorts by filename so the order is stable, and picks 音频索引 % total. Out of range? No crash - you get a one-second silent waveform, sample rate 44100, and the path string 索引越界-无音频, which is a polite way of saying "this index has no audio yet." That's a genuinely thoughtful behavior for batch generation where a run might produce fewer segments than the loop expects.

    The inputs that matter:

    • 音频文件夹路径 - the folder to scan. Point it at your clips, not a file.
    • 音频索引 - which file to load, starting at 0.
    • 起始秒数 and 截取时长秒数 (optional) - trim the loaded audio. Duration 0 means "to the end."

    Outputs: 音频 (AUDIO) for your sampler or mux, 采样率 (INT), 当前音频路径 (STRING), and 总音频数量 (INT). The path and count are the interesting ones - wire 总音频数量 into a loop bound and 当前音频路径 into a filename node and you've got a self-driving batch pipeline.

    Install is the standard fxai-toolkit story: ComfyUI Manager, search "fxai-toolkit", or cd ComfyUI/custom_nodes && git clone https://github.com/fxai666/fxai-toolkit and restart. The pack pulls in soundfile and psutil automatically and relies on FFmpeg being on PATH for the audio-heavy paths, so make sure it is. And yes, the labels are all Chinese - the pack is built by 凤希AI for a Chinese-speaking audience (help lives in QQ group 775649071 and on Bilibili), so expect to recognize the node by icon and menu position more than by reading it.

    Where people get burned: relative paths. The folder path is interpreted as-is from where ComfyUI runs, so a bare folder name may resolve somewhere you didn't intend - use an absolute path or a path you can see resolving in the output. And if you trim with 截取时长秒数, remember the trim happens after the index pick, so a short file plus a long requested duration just clamps to the file's actual length. It's a loader, not a miracle worker.

    Category凤希AI/音频

    Inputs (4)

    NameTypeDefaultDescription
    音频文件夹路径STRING
    音频索引INT0
    起始秒数optFLOAT0.000
    截取时长秒数optFLOAT0.000

    Outputs (4)

    NameTypeDescription
    音频AUDIO
    采样率INT
    当前音频路径STRING
    总音频数量INT