Nodes/Comfyui_URN_AudioTools/URN Save Audio with Lyrics
ComfyUI Node

URN Save Audio with Lyrics

Save audio with the words welded in — a file that knows its own lyrics

By Clivey1234·Created 2 days ago·Updated a day ago· 4
URN Save Audio with Lyrics
  • audio
  • audio
  • saved_path
◄lyrics—►
◄formatflac►
◄save_locationaudio►
◄filenameaudio►
◄source_filename_hint►
◄artist►
◄title►
◄album►

ComfyUI's core Save Audio writes a file and forgets everything about it. Which is fine right up until the moment you generate a song with lyrics you spent an hour on and the only record of those lyrics is a text widget in a workflow JSON you'll never open again.

URN Save Audio with Lyrics writes FLAC or MP3 with the lyrics, artist, title and album embedded in the file's real metadata - the same fields any player, tagger or DJ app can read. It's the other half of the round-trip with URN Load Audio.

How it works

FLAC is written losslessly via soundfile. MP3 is encoded by calling ffmpeg as a subprocess at 320 kbps with libmp3lame - meaning ffmpeg has to be on PATH, and the node raises a clear error if it isn't rather than writing a broken file.

Then the metadata goes in with mutagen, and the mapping is worth knowing because it's what makes the round-trip work:

  • MP3 - lyrics to ID3 USLT, artist to TPE1, title to TIT2, album to TALB, written as ID3v2.3 for broad player compatibility.
  • FLAC - lyrics to the Vorbis Comment LYRICS field, artist/title/album to the matching Vorbis Comments.

The node is an output node, so it runs on every queued workflow rather than being satisfied from cache - that's deliberate, since a save node that silently skips is worse than a slow one.

Inputs and outputs

  • audio - the AUDIO you want written. Loader, trim, mixer, whatever.
  • lyrics - required STRING. This is the point of the node; connect Transcript_Out from URN Audio Lyrics, or an accepted URN Text Edit string.
  • format - flac (default) or mp3.
  • save_location - a relative folder created under ComfyUI/output/ (the default is audio, and music/finished works the way you'd hope), or an absolute path like D:\Music\Exports.
  • filename - the base name, user-controlled. The extension for the selected format is appended automatically, and if you type an extension yourself it gets replaced to match format.
  • artist, title, album - optional strings, wired from URN Load Audio or URN Audio Lyrics.

Outputs are audio (passthrough, so you can keep going in the graph) and saved_path - the full path of what was written, returned newline-separated when a batch produced several files.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Clivey1234/Comfyui_URN_AudioTools

Then either run install.bat on Windows, or install the pack's requirements.txt with ComfyUI's Python environment - this node needs soundfile and mutagen, and MP3 export additionally needs ffmpeg available on PATH. FLAC export works without ffmpeg; that's your fallback if you're on a box where you can't install it.

ComfyUI Manager: search Comfyui_URN_AudioTools.

Common issues

MP3 export fails with an ffmpeg error. ffmpeg isn't on PATH as far as ComfyUI's process can see it. Either install it or switch format to flac - FLAC is lossless anyway, and the lyrics embed just as well.

Every file is called audio.flac. You left the filename widget at its default. It's a text box, not a prefix pattern - and the pack removed the old behaviour of copying the source filename, so nothing is auto-named for you any more. Type a name, or drive it from a string node.

A batch overwrote itself. A single audio payload with a batch of waveforms produces name.flac, name_001.flac, name_002.flac and so on, so that's handled. Two separate queue runs with the same filename will happily overwrite each other though - nothing warns you.

The lyrics look wrong when a player shows them. Some players only read synced (timed) lyrics and ignore the plain USLT frame. The lyrics are in the file; the player is being fussy. Check with a tag editor, or load the file back with URN Load Audio and read Embedded_Lyrics.

CategoryURN Audio Tools

Inputs (9)

NameTypeDefaultDescription
audioAUDIO—
lyricsSTRINGConnect the lyrics text to embed in the saved audio file.
formatCOMBOflac2 options: flac, mp3
save_locationSTRINGaudioFolder to save into. Relative paths are created under ComfyUI/output (for example: audio or music/finished). Absolute paths such as D:\Music\Exports are also supported.
filenameSTRINGaudioUser-controlled output filename. The selected FLAC/MP3 extension is added automatically.
source_filename_hintSTRING—
artistoptSTRINGOptional artist text to embed in the audio metadata.
titleoptSTRINGOptional title text to embed in the audio metadata.
albumoptSTRINGOptional album text to embed in the audio metadata.

Outputs (2)

NameTypeDescription
audioAUDIO—
saved_pathSTRING—