Nodes/XENodes/Save Audio
ComfyUI Node

Save Audio

The save node your TTS output has been missing

By xeinherjer-dev·Created 6 months ago·Updated a day ago· 2
Save Audio
  • audio
  • audio
filename_prefixaudio/ComfyUI
audio_codec

Audio is the newest, thinnest layer of the ComfyUI stack, and it shows in the tooling: plenty of nodes can generate sound - TTS voices, music, sound effects - but actually saving the result as a usable file was a gap. Save Audio fills it. It takes an AUDIO input and encodes it to MP3, Opus, or FLAC with proper codec settings, writes it to ComfyUI/output/, and shows a built-in player right on the node so you can check the result without leaving the canvas.

The mechanism is PyAV under the hood - the Python bindings for FFmpeg - and the codec choices are real, not labels. MP3 encodes with libmp3lame and defaults to V0 (the variable-bitrate mode that audiophiles actually pick, roughly 245kbps average); Opus forces a 48kHz output rate the way the format wants, and FLAC is true lossless with no bitrate setting at all. Channel layout is handled too - mono, stereo, and 5.1 all encode correctly, and batch inputs (a 3D waveform, which is how ComfyUI's audio nodes pass batches) come out as numbered files.

The inputs:

  • audio - the AUDIO you want saved. This is what TTS nodes like Chatterbox or Higgs Audio, and the audio-generation packs the KB tracks, output at their tail end.
  • filename_prefix - default audio/ComfyUI, same template language as the image saves (%date:yyyy-MM-dd%, %SomeNode.widget%).
  • audio_codec - mp3 / opus / flac, and choosing one reveals its bitrate dropdown (mp3: V0–320k; opus: 64k–320k; flac: none, because lossless).

The audio output passes the input through unchanged, so you can save and keep using the clip in the same graph.

Install is the pack one-liner:

cd ComfyUI/custom_nodes
git clone https://github.com/xeinherjer-dev/ComfyUI-XENodes.git xenodes

or search "ComfyUI-XENodes" in ComfyUI Manager, then restart.

Now the honest part, and it's a real one: this node imports PyAV (av) at module load, and it's not in the pack's requirements.txt - which is empty - nor clearly in the README (which only calls out ffmpeg for the HDR nodes). The pack's pyproject.toml declares imageio-ffmpeg, not av. So on a fresh, minimal ComfyUI install, Save Audio can fail to import, and because the whole pack loads its node modules as one unit, a missing av can take every XENodes node down with it. If you installed and the pack isn't there, check the console for an av import error and fix it with:

pip install av

It's a one-line fix, and it's a great example of why the README isn't the ground truth for what a pack actually needs. If you already run VHS (Video Helper Suite) or similar, you probably have av installed and will never hit it.

Beyond that, the caveats are mild. MP3 V0 is a great default but some downstream tools want a fixed bitrate - pick 192k or 320k if you're feeding an editor that chokes on VBR headers. And remember the pack-level gotcha once more: because everything imports together, the av fix is the first thing to try when any XENodes node is missing, not just this one.

Categoryxenodes/audio

Inputs (3)

NameTypeDefaultDescription
audioAUDIOThe audio to save.
filename_prefixSTRINGaudio/ComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.
audio_codecCOMBOThe codec to use for the audio. Recommended: mp3 (for workflow support).

Outputs (1)

NameTypeDescription
audioAUDIO