AIHub Expose Audio
Pulling audio from the editor's timeline into your workflow
- AUDIO
- LOCAL_FILE
- SEGMENT_ID
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), orupload(a file the user picks). Default isupload. - 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_FILEand 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_processworkflows. - 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | exposed_audio | A unique custom ID for this workflow. |
| label | STRING | Audio | This is the label that will appear in the field. |
| tooltip | STRING | An optional tooltip | |
| type | COMBO | upload | The source of the audio |
| index | INT | 0 | This value is used for sorting the input fields when displaying; lower values will appear first. |
| do_not_process | BOOLEAN | false | If set to true, the audio will not be processed by the node and you will have to handle it manually |
| optional | BOOLEAN | false | If set to true, it will not raise an error if the audio is not found |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |
| LOCAL_FILE | STRING | — |
| SEGMENT_ID | STRING | — |