URN Save Audio with Lyrics
Save audio with the words welded in — a file that knows its own lyrics
- audio
- audio
- saved_path
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 toTPE1, title toTIT2, album toTALB, written as ID3v2.3 for broad player compatibility. - FLAC - lyrics to the Vorbis Comment
LYRICSfield, 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; connectTranscript_Outfrom URN Audio Lyrics, or an acceptedURN Text Editstring.format-flac(default) ormp3.save_location- a relative folder created underComfyUI/output/(the default isaudio, andmusic/finishedworks the way you'd hope), or an absolute path likeD:\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 matchformat.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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| lyrics | STRING | Connect the lyrics text to embed in the saved audio file. | |
| format | COMBO | flac | 2 options: flac, mp3 |
| save_location | STRING | audio | Folder 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. |
| filename | STRING | audio | User-controlled output filename. The selected FLAC/MP3 extension is added automatically. |
| source_filename_hint | STRING | — | |
| artistopt | STRING | Optional artist text to embed in the audio metadata. | |
| titleopt | STRING | Optional title text to embed in the audio metadata. | |
| albumopt | STRING | Optional album text to embed in the audio metadata. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| saved_path | STRING | — |