ComfyUI-ALICE-Lab-Audio-Tools Introduction
ComfyUI-ALICE-Lab-Audio-Tools is a collection of ComfyUI nodes for selecting parts of audio and video, arranging and comparing audio, visualizing sound, and replacing a video’s soundtrack. It helps you work with media directly in a node workflow: you can choose a spoken passage, process or mix its audio, and preview the result alongside the corresponding video.
The extension is in alpha. The author may change node inputs, outputs, or interface behavior in future releases.
[ComfyUI-ALICE-Lab-Audio-Tools workflow overview](docs/images/workflow-overview.png)
Select the image to view an example workflow at full size.
How ComfyUI-ALICE-Lab-Audio-Tools Works
Think of a workflow as a set of connected editing stations. A Media Range node selects the material you want to work on; an Audio node edits or examines its sound; and a Video node lets you hear the result with the picture.
- Choose a source and a range. You can upload a file, read a file from an approved server folder, open a direct media URL, or select part of audio or video supplied by another node. Where a waveform is available, A and B mark the beginning and end of the selection.
- Pass media between nodes. An
AUDIOconnection carries sound, aVIDEOconnection carries video, and anIMAGEconnection carries an image such as a spectrogram or video frame. Numeric outputs such asstart_secondscan control a selection in another node. - Process and check the result. Mix tracks, compare two recordings, inspect a waveform or spectrogram, replace video audio, and preview the video without leaving the workflow.
For example, you can select a short scene with Load Media Range, send its audio through Audio Mixer, connect the mixed result and selected video to Replace Video Audio, then open Preview Video to check the scene.
The nodes appear in ComfyUI’s Add Node menu under ALICE_Lab, grouped into Audio, Media, Video, and Utils.
ComfyUI-ALICE-Lab-Audio-Tools Features
Select media and spoken passages
| Node | What it helps you do |
|---|---|
Load Media Range (Upload) | Upload local media, inspect its waveform, and choose an A–B section. It outputs the selected audio and, when the source includes video, the selected video. ComfyUI’s standard upload limit is 100 MB; uploaded files are stored in ComfyUI/input. |
Load Media Range (Path) | Open a supported file from a server folder that has been explicitly approved, without uploading another copy. The media_path must be an absolute path inside an allowed folder. If no folders have been approved, this node remains disabled. |
Media Range (URL) | Read a selected section from a direct HTTP(S) media URL that FFmpeg can open. It supports a single URL containing video and audio, or an audio-only URL—not separate video and audio URLs that need combining. |
Media Range (Input) | Preview and select part of AUDIO or VIDEO arriving from an upstream node. It accepts one media input at a time. |
Transcript Range Selector | Choose a starting and ending line from a timestamped transcript, then output their times for use with a Media Range node. |
Load Media Range (Upload) outputs 44.1 kHz stereo audio, the actual start and end times, the selection length, and video when available. If a file is too large to upload, the Path node can avoid making an upload copy—but the file must be in a server folder approved for that node.
Load Media Range (Upload) node
Media Range (Input) has two layers of selection. Its start_seconds and end_seconds inputs first define a broad section of the upstream media. The waveform’s A–B markers then select within that section, starting at a local 0 seconds. For instance, if the broad section starts at 30 seconds and you set A to 2 seconds and B to 5 seconds, the final selection runs from 32 to 35 seconds in the original media. An end_seconds value of 0 means “use the rest of the upstream input”; a local B value of 0 means “use the entire broad section.”
Transcript Range Selector accepts timestamped transcript data as JSON segments or as SRT/WebVTT text. Run the upstream transcription step first so the lines become available, select the start and end lines, then rerun the downstream selection. Its End mode controls what happens when you change the start line:
- Same segment (default) selects the same line as the end.
- Keep current retains the chosen end unless it falls before the new start.
- Next segment extends the selection to the next line.
Connect its start_seconds and end_seconds outputs to the matching Media Range inputs.
Transcript Range Selector node
Media Range (URL) needs a direct media address, not a YouTube page or another site’s viewing page. It does not resolve page URLs, bypass authentication, or process DRM. It saves only the requested section to the ALICE Lab cache and reuses that section when you run the same URL and range again. If you move A or B outside the currently loaded section, rerun the workflow before previewing. Direct stream links can expire, so you may need to obtain a fresh URL if one stops working. The ComfyUI server—not your browser—opens the URL; use this node with media addresses you trust.
For URL video that needs encoding, video_encoder offers auto, nvenc, videotoolbox, and cpu. Auto tests an available hardware encoder and falls back to CPU encoding when necessary. An explicitly selected encoder reports an error if unavailable rather than silently changing to CPU.
Mix, compare, and inspect audio
Audio Mixer arranges up to eight tracks on a shared timeline. You can set track names and colors; move clips; adjust clip gain, position, and fade-in or fade-out; mute or solo tracks; and control master gain and clipping protection. It outputs both the combined mixed_audio and processed individual tracks.
Click a clip to select it and drag it to move it. Drag an edge to shorten or lengthen it: shortened material can be revealed again, while length beyond the original recording becomes silence. Right-click a clip to Copy, Cut, Duplicate, or Delete it. You can paste onto the same track or another track at the time you choose; duplication places an editable copy immediately after the original. Double-click the dB, Pos, Fade In, or Fade Out label to reset that value to zero. Enable reset_before_run when you want the next run to discard clip edits and copied or pasted clips and reset gain, position, and fades.
Compare Audio automatically lines up two recordings and provides aligned audio, their difference, an overlay, a similarity value, and the delay between them. This can help you inspect two versions of a sound or check whether a processing step changed it. Similarity describes the audio signals; it is not speech recognition, speaker identification, a perceptual quality score, or proof that two recordings are identical. Automatic alignment can choose an unexpected position when recordings are silent, unrelated, highly repetitive, or farther apart than its search range.
Audio Spectrogram turns sound into an IMAGE showing how its frequency content changes over time, with intensity measured in dBFS. It offers a different view from a waveform when you want to inspect the character of a sound.
Output Waveform lets you play connected audio and see its waveform, duration, sample rate, channel count, and peak dBFS.
Output Float displays a connected FLOAT value with your choice of 0–12 decimal places and passes the value onward unchanged. It is useful for reading results such as a comparison’s similarity or delay.
Work with video and reference audio
Replace Video Audio keeps the video picture and replaces its soundtrack with connected audio. If the new audio is shorter than the video, the remaining time is filled with silence; if it is longer, it is cut to the video’s duration. The output is an MP4 with AAC audio at 192 kbps. When video cannot be copied without re-encoding, video_encoder lets you choose auto, nvenc, videotoolbox, or cpu.
Preview Video plays connected VIDEO in the node and makes a browser preview file available to download. Its status shows the method actually used—copy, nvenc, videotoolbox, cpu, or comfy. It is a quick-check node, not a way to save directly to an arbitrary server folder.
Video First / Last Frame outputs the first and last frames of a VIDEO as ComfyUI IMAGE values. For a selected video section, these images show exactly where the visual cut begins and ends.
Audio to Irodori Ref Config converts AUDIO into an IRODORI_REF_CONFIG connection for the IrodoriTTS Sampler from comfy-Irodori-TTS. Its normalize_ref_audio and max_ref_seconds settings match those of IrodoriTTS Reference Audio. It uses the first audio batch, combines its channels into mono, and saves a reusable WAV reference in the ALICE Lab cache. You can use the rest of this extension without comfy-Irodori-TTS; that separate extension is needed only for the receiving Sampler.
Audio to Irodori Ref Config node
ALICE Lab Cache Manager shows how much persistent cache space the extension uses for transcripts, thumbnails, media, and metadata. Choose inspect to see file counts, sizes, and paths. To remove cached data, choose clear, select one category or all, and enable confirm_clear. Cached data remains after ComfyUI restarts; clearing it may mean that previews or other cached results need to be created again.
Example workflows
Ready-to-open workflow JSON files are available in docs/examples/.
Select part of a video and replace its audio
Load Media Range.audio ──> audio processing or Audio Mixer ──> Replace Video Audio.audio
Load Media Range.video ────────────────────────────────> Replace Video Audio.video
Replace Video Audio.video ──> Preview Video
[Workflow for selecting and processing part of a video](docs/images/select_and_process_part_of_video.png)
Compare two audio results
audio result 1 ──> Compare Audio.audio_1
audio result 2 ──> Compare Audio.audio_2
Compare Audio.similarity ──> Output Float
Compare Audio.audio_2_delay_seconds ──> Output Float
Compare Audio difference ──> Output Waveform
[[Workflow for comparing two audio results](docs/images/compare_two_audio _results.png)](docs/images/compare_two_audio _results.png)
Create a spectrogram image
AUDIO ──> Audio Spectrogram ──> IMAGE
[[Workflow for creating a spectrogram image](docs/images/create_spectrogram _mage.png)](docs/images/create_spectrogram _mage.png)
Use a selected passage as an Irodori-TTS reference
Media Range (Input).audio
──> Audio to Irodori Ref Config.audio
──> IrodoriTTS Sampler.ref_config
ComfyUI-ALICE-Lab-Audio-Tools Models and Requirements
This extension does not include AI models or an inference engine, so there is no model list or model choice to make for its own nodes. The Irodori reference node prepares audio for the separate comfy-Irodori-TTS extension; it does not include that extension.
To use these tools, your ComfyUI environment needs support for the current AUDIO type and the comfy_api.latest video API, a modern browser supported by ComfyUI’s frontend, and ffmpeg plus ffprobe available to the running ComfyUI process. Supported media file extensions include:
aac aiff avi flac m2ts m4a m4v mkv mov
mp3 mp4 mpg mpeg ogg opus ts wav webm wma
A supported extension does not guarantee that a file will open: the installed FFmpeg must also be able to decode the file’s audio or video format.
Troubleshooting ComfyUI-ALICE-Lab-Audio-Tools
A node is missing from Add Node.
- Look for the
ALICE_Labcategory. - Restart ComfyUI and check its console for an import error.
- If the category is still missing, verify that your ComfyUI version supports the current
AUDIOtype andcomfy_api.latestvideo API, and that the extension’s top-level__init__.pyis present.
A media file will not open or preview.
- Check that its extension is in the supported list above.
- Confirm that
ffmpegandffprobeare available to the ComfyUI process, not only in a separate terminal. - Check whether your installed FFmpeg can decode that particular file. On macOS, a graphical launch may not inherit the same command path as your terminal. On Windows, also check drive letters, long paths, and filenames containing non-ASCII characters.
Load Media Range (Path) will not accept a file.
- Confirm that the file is inside a server folder explicitly approved through
ALICE_LAB_MEDIA_ROOTS; without approved folders, the Path node is disabled. - Use the file’s absolute path. Paths outside an approved folder—including paths that lead outside through a symbolic link—are rejected.
- After changing the path, run the workflow. The waveform and preview become available only after the backend validates the file.
Media Range (URL) stops working.
- Check that you supplied a direct
http://orhttps://media URL rather than a viewing-page URL. - If you see a 403 or 404 error, the link may have expired. Obtain a fresh direct URL and rerun the workflow.
- For timeout, DNS, disconnection, or unsupported-format errors, check whether the server can reach and read that URL.
- If you moved the selection outside the section already loaded, rerun the workflow before previewing.
The encoder you selected reports an error. Try auto to let the node test an available encoder and fall back to CPU when needed. If you explicitly choose nvenc, videotoolbox, or cpu, that choice must be available in your environment; CPU H.264 encoding requires libx264.
The interface looks incorrectly sized after a ComfyUI update. Hard-refresh your browser page. On Windows and Linux, use Ctrl+Shift+R.
An earlier Compare Audio result is no longer available. Comparison sessions expire to limit memory use. Rerun Compare Audio.
Frequently asked questions
Why does a file-based Media Range output sound different from an upstream audio input? File-based Media Range nodes output 44.1 kHz stereo audio. Media Range (Input) preserves the original format when it receives AUDIO directly.
Why did Compare Audio choose an unexpected delay? Its alignment uses patterns in signal loudness. Silence, repeating sounds, unrelated recordings, or a delay outside its search range can make alignment ambiguous. Check the aligned audio and difference rather than relying on the delay value alone.
Does the similarity number tell me whether two voices are the same? No. It compares audio signals; it does not identify speakers or judge perceived sound quality.
Can Preview Video save my finished video to a server folder? No. It creates a temporary file for browser playback and download, not a direct server-side export.
Will clearing the cache delete my source media? Cache Manager limits deletion to its four ALICE Lab cache categories. It does not follow symbolic links out of the cache. Review the category and reported path before confirming a clear.
Learn More about ComfyUI-ALICE-Lab-Audio-Tools
- Browse the example workflow JSON files to see how nodes connect in practice.
- Select the workflow and node images throughout this README to inspect their layouts more closely.
- If you are using reference audio for speech generation, see the separate comfy-Irodori-TTS project for the receiving Sampler.
The extension is provided under the Apache License 2.0; attribution information is in NOTICE. Use media in accordance with applicable laws, licenses, copyrights, and terms of service.
