Nodes/ComfyUI-EdgeTTS/Save Audio 🔊
ComfyUI Node

Save Audio 🔊

Write AUDIO to wav, mp3 or flac from a ComfyUI graph

By 1038lab·Created 2 years ago·Updated 6 months ago· 74
Save Audio 🔊
  • audio
  • filepath
  • audio
â—„filepathâ–º
â—„formatmp3â–º
â—„qualityhighâ–º
â—„overwritefalseâ–º

This is the small, boring node that actually gets your sound out of ComfyUI, and you need it more often than you'd think. Most audio nodes - including the Edge TTS node it ships beside - produce an AUDIO object in memory and stop there. Save Audio is the one that takes that object and writes a real file to disk in the format you want. Nothing glamorous. Just the piece that turns "the graph ran" into "there's an mp3 I can use."

It comes from 1038lab's ComfyUI-EdgeTTS pack, and it's the natural terminal node for the Edge TTS → Save Audio flow, but it'll happily save AUDIO from anything upstream - a TTS node, a loaded clip, an audio-processing chain.

How it works

You hand it an AUDIO input and it encodes and writes the file. It's a true output node, so dropping it into your graph and hitting Run is enough to produce a file - no separate "execute" step. It picks the encoder from your chosen format and quality preset, handles the file naming, and - unless you tell it otherwise - auto-numbers the output so a second run doesn't clobber the first.

Handy detail: it doesn't just save, it also passes the audio straight back out. So you can drop it mid-chain to write an intermediate file and still keep feeding the same audio into the next node.

The inputs and outputs that matter

  • audio (AUDIO) - the sound to save. Wire this from Edge TTS or any node that emits AUDIO.
  • format - wav, mp3, or flac (default mp3). WAV for a lossless, universally-openable file; MP3 when you want something small to hand off; FLAC for lossless-but-compressed.
  • quality - high / medium / low (default high). For lossy MP3 this sets the bitrate; on WAV/FLAC it makes little practical difference, so just leave it on high.
  • filepath - where and what to name it. Leave it blank to drop the file in ComfyUI's default output folder with automatic numbering; set a path/name to control it.
  • overwrite (default false) - off means it numbers new files instead of overwriting; flip it on if you deliberately want to replace the same file each run.

Outputs are filepath (a STRING with the path it actually wrote - useful if a later node needs to know where the file landed) and audio (the same AUDIO, passed through).

How to install it

It's part of the ComfyUI-EdgeTTS pack, so you install the whole pack once. Via ComfyUI Manager: search Comfyui-EdgeTTS, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/1038lab/ComfyUI-EdgeTTS.git
./ComfyUI/python_embeded/python -m pip install -r requirements.txt

Then restart ComfyUI.

Common issues

WAV saves fine but MP3 or FLAC fails or produces nothing. Lossy/compressed encoding leans on the pack's audio backend. If you're on a recent torch/torchaudio (2.9+), that stack now needs torchcodec to encode - the pack's own install notes call this out. The fix is to match torchcodec to your torch build:

./ComfyUI/python_embeded/python -m pip install --no-cache-dir "torchcodec==0.9"

FFmpeg on your system PATH is the other thing the pack expects for audio work; if MP3 export is misbehaving, confirm that's installed too.

"It ran but I can't find the file." With filepath blank it writes into ComfyUI's default output directory - check there. The filepath STRING output tells you the exact path if you ever lose track.

Every run makes a new numbered file. That's overwrite doing its job (it defaults to off). Turn it on if you'd rather keep overwriting one filename.

Category🧪AILab/🔊Audio

Inputs (5)

NameTypeDefaultDescription
audioAUDIO—
filepathSTRINGby default, the audio will be saved to output/TTS/{date}/TTS-xxxx.{format}
formatCOMBOmp33 options: wav, mp3, flac
qualityCOMBOhigh3 options: high, medium, low
overwriteBOOLEANfalse—

Outputs (2)

NameTypeDescription
filepathSTRING—
audioAUDIO—