ComfyUI Node

AIHub Expose Audio

Pulling audio from the editor's timeline into your workflow

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Audio
    • AUDIO
    • LOCAL_FILE
    • SEGMENT_ID
    idexposed_audio
    labelAudio
    tooltip
    typeupload
    index0
    do_not_processfalse
    optionalfalse

    AIHub Expose Audio is the inbound half of the pack's audio story. Where AIHub Action New Audio ships generated audio out to the client, this node pulls audio in: the segment currently being edited, the whole merged mix, or a file the user uploads. It's how a DAW or video editor hands ComfyUI the sound it should work on - noise reduction, voice generation from a reference, audio-to-video synchronization, whatever the workflow does with an AUDIO input.

    Same pack, same framing: this is otavanopisto's ComfyUI-aihub-workflow-exposer, the bridge that lets external apps drive ComfyUI as their generation engine. Expose nodes are the inputs to the graph - the client's data arrives over the pack's own websocket (port 8111) and gets fed into the workflow as if it were a widget value. That's the whole trick, and it's why these nodes look like ordinary nodes with a lot of extra fields.

    How it works

    The type field decides where the audio comes from, and the client sends it as a temp file over the websocket. When the node runs, it loads that file through ComfyUI's audio loader and hands you a standard AUDIO dict (waveform + sample_rate), which is exactly what any audio-processing node expects. The LOCAL_FILE output tells you the path it loaded, and SEGMENT_ID tells you which segment it came from - useful when the workflow needs to send a result back to the same segment with an action node.

    The inputs that matter

    • id - the unique field id for this expose. The client references the field by this id, so keep it stable and unique within the workflow (ids are used in condition expressions too).
    • label - what the client's UI shows for this field. Make it human, like "Voice reference."
    • type - the source: current_segment (the segment being edited), merged_audio (the whole timeline mix), or upload (a file the user picks). Default is upload.
    • index - sort order in the client's field list; lower first.
    • do_not_process - if true, the node won't decode the audio; you get the file path via LOCAL_FILE and handle loading yourself. Escape hatch for workflows that need the raw file.
    • optional - if true, a missing audio doesn't raise an error; the node returns empty values instead.

    The outputs that matter

    • AUDIO - the decoded audio dict, ready to wire into an audio pipeline.
    • LOCAL_FILE - the path of the file, for do_not_process workflows.
    • SEGMENT_ID - the segment the audio came from, for round-tripping.

    Installing it

    ComfyUI Manager (search "ComfyUI-aihub-workflow-exposer"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    # restart ComfyUI
    

    No requirements, no model downloads.

    Where people get burned

    The classic confusion: run this in the stock UI and it errors with "You must specify the local_file" - because in the plain web UI there's no client sending the file. It's not broken; it's waiting for a client that isn't there. Set optional on to at least get a graceful empty output while you're testing. And don't forget do_not_process exists: if your workflow needs the original file rather than the decoded audio, that flag saves you from double-handling it.

    Categoryaihub/expose

    Inputs (7)

    NameTypeDefaultDescription
    idSTRINGexposed_audioA unique custom ID for this workflow.
    labelSTRINGAudioThis is the label that will appear in the field.
    tooltipSTRINGAn optional tooltip
    typeCOMBOuploadThe source of the audio
    indexINT0This value is used for sorting the input fields when displaying; lower values will appear first.
    do_not_processBOOLEANfalseIf set to true, the audio will not be processed by the node and you will have to handle it manually
    optionalBOOLEANfalseIf set to true, it will not raise an error if the audio is not found

    Outputs (3)

    NameTypeDescription
    AUDIOAUDIO
    LOCAL_FILESTRING
    SEGMENT_IDSTRING