Nodes/CRT-Nodes/Audio Loader Crawl Batch (CRT)
ComfyUI Node

Audio Loader Crawl Batch (CRT)

Point it at a folder of audio, get a padded batch — with the filenames riding along

By PGCRT·Created 2 years ago·Updated 6 days ago· 138
Audio Loader Crawl Batch (CRT)
    • audio
    • file_names
    • file_paths
    • batch_count
    • total_files
    folder_path
    batch_count8
    seed0
    file_extensionall
    crawl_subfoldersfalse
    remove_extensionfalse
    sample_rate44100
    max_length_seconds0.0
    start_offset_seconds0.0
    gain_db0.0
    print_indextrue

    This is the node that makes "transcribe an entire folder of audio" a one-click job instead of a per-file chore. Audio Loader Crawl Batch scans a folder for audio files, picks a window of them, loads each one, resamples them all to a common rate, and stacks them into a single padded AUDIO batch. The trick that makes it useful is in the second output: alongside the audio it hands you file_names and file_paths as lists, so the transcript that comes out the other end can be saved back next to the file it came from.

    It's from PGCRT's CRT-Nodes pack, the same collection that grew out of the author's Z-Image LoRA loader back in late 2025. The pack is a grab-bag - audio, video, model auto-downloaders, FX - and this node lives at the load end of its audio transcription pipeline, designed to feed Audio Transcript Batch (CRT) and Save Text With Path (CRT).

    How it works

    Crawl is the right name. You give it a folder_path, and it walks the folder (subfolders too if you flip crawl_subfolders) picking up whatever matches file_extension - all covers wav, mp3, flac, and ogg. Files are sorted naturally, so clip2.wav sorts before clip10.wav, which is the difference between a sane order and a jumbled one when your files have numbers in the names.

    Selection is where the batch feel comes from. The window starts at seed × batch_count, wraps around the folder, and batch_count files get loaded. Bump the seed and you walk forward through the folder in windows - paired with the sampler side of a batch workflow this lets you crunch 64 files at a time, then 64 more, without reconfiguring anything. The node also prefetches the next window in a background thread while you transcribe the current one, so long runs don't stall on disk I/O.

    Every file is resampled to sample_rate (44.1 kHz default) and the batch is zero-padded to the longest file, which is what lets different-length clips share one tensor. You can trim with max_length_seconds and start_offset_seconds, apply gain_db, and use remove_extension to strip .wav from the reported names.

    The inputs and outputs that matter

    Realistically you set four things: folder_path, batch_count, seed, and maybe sample_rate. The rest are well-behaved defaults - leave gain_db at 0, max_length_seconds at 0 (no limit), and start_offset_seconds at 0.

    The outputs carry the batch's bookkeeping:

    • audio - the padded AUDIO tensor, one clip per batch slot. Wire this into a transcription or audio-processing node.
    • file_names / file_paths - lists that line up slot-for-slot with the audio. file_paths is actually the containing directory per file, so a downstream Save Text With Path can drop each transcript next to its source even when the sources live in different subfolders. That pairing is the whole point of this node.
    • batch_count and total_files - handy if you want to know how many windows remain or drive a loop.

    Installing it

    Install the pack once and every CRT node comes with it. Easiest is ComfyUI Manager - search CRT-Nodes and install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PGCRT/CRT-Nodes.git
    pip install -r requirements.txt
    

    then restart ComfyUI. Fair warning: this pack's requirements list is long - opencv, librosa, pedalboard, soundfile, faster-whisper, transformers - because it bundles audio and vision tooling. You're pulling in the whole kitchen sink to get the one node, so expect the install to take a while and the first run to be slow while torchaudio does its thing.

    Common issues

    • "Folder path is empty / not found" - the node returns a blank batch and lists the error in file_names. Double-check the path, and remember it takes an absolute path, not a relative one.
    • Odd batch counts - batch_count is clamped to total_files, so a folder with 3 files and batch_count=8 silently gives you 3. Not a bug; just don't expect zero padding beyond what exists.
    • After an update, nodes whose sockets changed can go red or show NaN. Right-click → Fix node (recreate) and the sockets refresh.
    CategoryCRT/Load

    Inputs (11)

    NameTypeDefaultDescription
    folder_pathSTRINGPath to the folder containing audio files
    batch_countINT81–64Number of audio files to load. Window starts at seed × batch_count and wraps around the folder. Batches are zero-padded to the longest file.
    seedINT00–18446744073709550000Selects the starting file: index = (seed × batch_count) % total_files.
    file_extensionCOMBOallFile extension to filter for. 'all' includes wav, mp3, flac and ogg.
    crawl_subfoldersBOOLEANfalse
    remove_extensionBOOLEANfalse
    sample_rateINT441008000–192000All files are resampled to this rate so they can be stacked into one batch.
    max_length_secondsFLOAT0.0Maximum length of each audio in seconds (0 for no limit)
    start_offset_secondsFLOAT0.0Start loading the audio from this offset in seconds
    gain_dbFLOAT0.0-120–120Gain in decibels (dB)
    print_indexBOOLEANtruePrint each selected file index and name to the console.

    Outputs (5)

    NameTypeDescription
    audioAUDIO
    file_namesSTRING
    file_pathsSTRING
    batch_countINT
    total_filesINT