Nodes/ComfyUI-nhknodes/πŸ”Š Play Sound (nhk)
ComfyUI Node

πŸ”Š Play Sound (nhk)

Stop Staring at the Progress Bar β€” Play Sound (nhk)

By EnashkaΒ·Created 12 months agoΒ·Updated 27 days agoΒ· 23
πŸ”Š Play Sound (nhk)
  • any
  • *
β—„modeβ–Ύβ–Ί
β—„volume0.5β–Ί
β—„filenotify.mp3β–Ί

Play Sound (nhk) is the node that plays a little ding when your queue finishes so you can go make tea instead of watching a progress bar. If you run long batch generations - 50 images, a big upscale, a video pass - you know the feeling. This is the "notify me" node for your ears.

The clever bit is that it doesn't replace anything in your graph. It's a pass-through, so you can drop it anywhere in a chain without breaking data flow, and it fires on every execution.

How it works

The Python side is deliberately a no-op: nop just returns its input unchanged, marked with IS_CHANGED returning NaN so it re-executes every run. All the audio lives in the frontend JavaScript. When the node executes, the JS checks the mode widget:

  • always - play the sound every execution.
  • on empty queue - wait half a second and only play if the queue is actually done (app.ui.lastQueueSize === 0). This is the one you want for a final "batch is over" chime.

Then it resolves the file widget: if it's a bare filename with no path separator and not an http(s) URL, it's looked up relative to the pack's own assets/ folder - which is why the default notify.mp3 works out of the box; the pack ships one. A full path or a URL works too, and the volume widget (0.0 to 1.0, default 0.5) sets the audio volume.

The inputs and output

  • any - pass-through input. Any type, because it just needs to hold a wire.
  • mode - always or on empty queue.
  • volume - 0.0 to 1.0, default 0.5.
  • file - path or URL to the sound. Default notify.mp3, which resolves to the bundled file.

The single output is a wildcard pass-through of whatever you fed in, so wiring it mid-graph doesn't change your data at all. It's also marked as an output node, so the queue's execution reaches it even if nothing downstream cares.

Installing it

Part of ComfyUI-nhknodes. Manager β†’ search "NHK Nodes", or:

cd ComfyUI/custom_nodes && git clone https://github.com/Enashka/ComfyUI-nhknodes

then restart. No extra installs, no API keys. This node is pure torch/numpy + browser audio.

Where people get tripped up

Because it plays through the browser, the browser tab has to be open and not muted - headless or API runs won't make noise, and some browsers block autoplay until you've interacted with the page once. The on empty queue check relies on ComfyUI's app.ui.lastQueueSize, which is a decent proxy but can miss the mark if you have other queued jobs from another tab; when in doubt, use always. And if you point file at something that doesn't exist, you'll get a silent failure rather than an error - the bundled notify.mp3 is the safe default for a reason.

Categorynhk/utility

Inputs (4)

NameTypeDefaultDescription
any*Pass-through input (any type)
modeCOMBOWhen to play sound: always or only when queue is empty
volumeFLOAT0.50–1Sound volume (0.0 to 1.0)
fileSTRINGnotify.mp3Path to sound file to play

Outputs (1)

NameTypeDescription
**β€”