Nodes/ComfyUI_AceNodes/πŸ… Audio Play
ComfyUI Node

πŸ… Audio Play

Hear the audio right in your browser β€” no file, no player tab

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Audio Play
  • audio
  • *
β—„modeβ–Ύβ–Ί
β—„volume0.5β–Ί
β—„sample_rateβ€”β–Ί

The most annoying gap in ComfyUI's audio support isn't generation - it's listening. There's no built-in way to hear the audio your graph just made. ACE_AudioPlay fixes that with the most direct approach possible: it plays the audio through your browser's WebAudio API, right on the canvas, no file written, no external player. Run the graph, hear the clip. That's it.

It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), the usual one-author grab-bag - and this is one of its nicer quality-of-life touches.

How it works

Feed it audio plus its sample rate, and the node's frontend JS (web/js/audioPlay.js) takes the waveform, builds an AudioBuffer in your browser, and plays it. Because the playback happens in the browser, your ComfyUI server doesn't need audio hardware or a sound server - anything with speakers and a browser tab works.

Inputs:

  • audio - the samples (matching this pack's ACE_AudioLoad output: a list of floats).
  • sample_rate - required, wire it from the load node.
  • volume - 0.0 to 1.0, default 0.5. Convenient when a TTS node outputs hot or quiet.
  • mode - always plays every run; on empty queue plays only when the queue has finished. The second one is for when you're batch-generating and don't want 47 audio files blasting over each other - you get one playback when everything's done. That's the mode most people actually want in a batch.

It's an output node, so nothing flows onward from it - it's the terminal "deliver to my ears" step.

The gotchas

  • The pack's audio format split again: ACE_AudioPlay expects raw samples + a sample-rate integer (like ACE_AudioLoad produces). It will not accept the {"waveform", "sample_rate"} dict that ACE_AudioCrop and other dict-based audio nodes emit. Same internal inconsistency as the rest of the pack's audio nodes - check what format your upstream actually produces.
  • Browser autoplay rules. Browsers block audio until the page has had user interaction. If you load a workflow and run it cold, the first playback may be silently swallowed - click anywhere in the ComfyUI page once and subsequent runs are fine.
  • on empty queue is a best effort. It looks at the UI's last queue size with a short delay; on very fast queues the timing can be off and it may play anyway. It's "mostly on empty queue."

Installing

ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes

Then restart. No extra Python dependencies for this node beyond the pack's (heavy) requirements.txt - playback is all browser-side. If you're on a remote setup where your browser is far from the machine, this is actually the best way to hear audio, because the sound renders on your local machine.

Verdict: the "play in browser" pattern exists in a few packs (VideoHelperSuite can do it for video+audio), but this one is dead simple and does exactly one thing. For quickly verifying a TTS or music clip, it's the node you'll reach for - just remember the browser-interaction click on a fresh tab.

CategoryAce Nodes

Inputs (4)

NameTypeDefaultDescription
modeCOMBO2 options: always, on empty queue
volumeFLOAT0.50–1β€”
audio*β€”
sample_rateINTβ€”

Outputs (1)

NameTypeDescription
**β€”