PlaySoundKJ
Get a sound when your queue actually finishes
- any_input
- audio
- any_output
The honest use case for this node is the least glamorous one: you've got a long queue of jobs running unattended, and you want to know the moment it's actually done without babysitting the tab. PlaySoundKJ plays audio in your browser, and its mode setting decides when: always fires on every single execution (fine for a one-off preview, obnoxious in a long batch), on_change only replays when the audio content is actually different from last time, and on_empty_queue - the one you actually want for the "notify me when it's done" case - plays only once the queue has fully drained.
The inputs and outputs that matter
audio_path- a filesystem path, read by the machine running ComfyUI (not something you upload through the browser). Point it at a chime or notification sound sitting on that machine.audio(optional) - anAUDIOsocket. If you wire something in here - the output of an audio-generation node, say - it takes over fromaudio_pathas the source.mode-always,on_empty_queue, oron_change, covered above.volume(0–1, default 0.5) andduration(0–300 seconds, default 5; 0 means play the whole clip) - self-explanatory playback controls.any_input(optional) andany_output- a wildcard pass-through pair. This is the useful bit for wiring it into an existing graph without disturbing anything: connect any node's output throughany_input, takeany_outputonward to wherever that output was originally headed, and this node just quietly plays a sound as a side effect at that point in execution, without you having to restructure your graph around it.
How to install it
Same as any KJNodes node: ComfyUI Manager → search "KJNodes for ComfyUI" → install, or manually - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, pip install -r ComfyUI-KJNodes/requirements.txt, restart. Nothing extra needed for this node specifically beyond having a sound file somewhere on disk to point audio_path at, unless you're feeding it a live AUDIO input instead.
Common issues & troubleshooting
No sound plays at all. Browsers block autoplaying audio by default until you've interacted with the page - if you loaded the ComfyUI tab and walked away without clicking anything first, the very first playback attempt can get silently blocked. Click somewhere on the page once before you queue up a long run.
audio_path points at nothing. Remember it's a server-side path, read by whatever machine is actually running the ComfyUI backend - if you're running ComfyUI remotely (a cloud GPU, a headless box) and typed a path that only exists on your local laptop, nothing will play, because the file genuinely isn't there from the server's point of view.
mode: always gets old fast. If you're running a big batch of jobs and picked always, you'll get a sound on every single one. Switch to on_empty_queue if what you actually want is a single "you're done" ping.
Volume/duration seem to do nothing with a very short clip. duration caps playback length, it doesn't extend a short clip - if your source audio is shorter than the duration you set, the clip just ends on its own.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_path | STRING | Path to an audio file. Used when audio input is not connected. | |
| mode | COMBO | always | 3 options: always, on_empty_queue, on_change |
| volume | FLOAT | 0.500–1 | — |
| duration | FLOAT | 5.00–300 | Duration in seconds to play. 0 = play full audio. |
| any_inputopt | * | — | |
| audioopt | AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any_output | * | — |