Nodes/Boyonodes/Boyo Audio Evaluator
ComfyUI Node

Boyo Audio Evaluator

Size your video to your audio before the audio is even in the graph

By DragonDiffusionbyBoyo·Created 2 years ago·Updated 27 days ago· 16
Boyo Audio Evaluator
    • frame_count
    • video_length_seconds
    • metadata
    audio_path./input/audio.wav
    fps23.0

    Here's the workflow problem Boyo Audio Evaluator exists for: you're making a video that has to be exactly as long as an audio file. Maybe it's a voiceover, maybe a song, maybe a lip-sync track. The video model needs a frame count before you've generated anything, and the audio tensor doesn't exist in your graph yet - it's just a .wav sitting in a folder. This node reads the file from disk, measures it, and gives you the frame count at whatever FPS you're targeting.

    The distinction from Boyo Audio Duration Analyzer matters: that node measures an in-graph AUDIO tensor; this one reads a file path off disk. You use this one first, at the planning stage, to size the generation; you use the other one mid-pipeline once real audio is flowing. Same family, different stage of the job.

    How it works

    It uses soundfile to read the file and its metadata. Get the length in seconds, multiply by your FPS, round up, and that's your frame count:

    frame_count = ceil(audio_length_seconds × fps)
    

    Rounding up matters - it's the difference between a video that's a hair too short (you get a gap or a freeze) and one that's a hair too long (you trim the tail). The author chose ceil deliberately; a 10.2-second target at 24 FPS becomes 245 frames, not 244.

    audio_path (default ./input/audio.wav) is relative to your ComfyUI install directory, so ./input/audio.wav means ComfyUI/input/audio.wav. Absolute paths work too. fps (1–60, default 23) is your render frame rate - match it to whatever your video pipeline uses, or the count will be subtly wrong. The three outputs are frame_count (INT), video_length_seconds (FLOAT), and metadata (STRING) with a readable summary of all three.

    Setting it up

    The node needs soundfile, which is in the pack's requirements but not its minimal install:

    cd ComfyUI/custom_nodes && git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes
    pip install soundfile
    

    then restart. (The full audio install from the README - librosa transformers safetensors huggingface_hub pyloudnorm soundfile - covers this and the rest of the audio nodes in one go.)

    Where people get burned

    • "Audio file not found" - path resolution. ./input/audio.wav is relative to the ComfyUI root, so if you've put the file elsewhere, give the full path. This is the most common miss by far.
    • Wrong frame count for your actual render - you set FPS 24 in the node but your video node is at 16fps or the model's native rate. Double-check both sides.
    • The number is a float in disguise - remember the output is a rounded-up INT; if you feed it into something expecting exact seconds, use the video_length_seconds output instead.

    That's the whole node - small, single-purpose, and quietly the difference between a lip-sync video that lines up on the first try and one you spend an hour trimming by hand. If you're building the audio-driven-video pipeline this pack is clearly aiming at, it's the piece that makes the math come out right before you commit minutes of generation to the wrong length.

    CategoryVideoUtils

    Inputs (2)

    NameTypeDefaultDescription
    audio_pathSTRING./input/audio.wav
    fpsFLOAT23.01–60

    Outputs (3)

    NameTypeDescription
    frame_countINT
    video_length_secondsFLOAT
    metadataSTRING