Nodes/ComfyUI_FL-CosyVoice3/FL CosyVoice3 Audio Crop
ComfyUI Node

FL CosyVoice3 Audio Crop

The Boring Trim Node That Saves Every CosyVoice Workflow

By filliptm·Created 8 months ago·Updated 8 days ago· 146
FL CosyVoice3 Audio Crop
  • audio
  • audio
â—„start_time0:00â–º
â—„end_time0:10â–º

This is a utility node, and it's the most quietly important one in the FL CosyVoice3 pack. It does one thing: cut an audio clip down to a start and end time. That sounds like nothing, but every other node in this pack has a hard 30-second cap on reference audio - and errors loudly if you exceed it - while recommending 3–10 seconds for the best voice quality. Audio Crop is how you get there without leaving the graph or firing up an external editor.

You'll reach for it constantly for a boring practical reason: real reference clips are long. A voice sample pulled from a podcast or a video is minutes of talking, and the pack's Voice Conversion, Instruct2, and Speaker nodes will all refuse it past 30 seconds. Crop a clean 5-second sentence out of it and suddenly everything works. It's also the fix when your source audio has music or noise on either end - trimming to the speech-only middle makes the clone dramatically better, because the model hears what you hear.

How it works

Mechanically it's about as simple as a node gets. It parses the two time strings into seconds, slices the waveform, and returns a standard ComfyUI AUDIO object with the same sample rate as the input. The whole thing runs locally, no model involved, no VRAM touched - it's pure audio editing. There's a short helper function that handles the time-string format, so the one thing to get right is the format of those inputs.

The inputs that matter

Only three, all required:

  • audio - any ComfyUI AUDIO object. Wire in whatever you're about to trim.
  • start_time - where to begin, as a string like 0:00 (MM:SS) or 1:30 - the long form 0:01:30 (HH:MM:SS) works too. Default 0:00.
  • end_time - where to stop, same format. Default 0:10.

The single output is audio - the cropped clip, ready to feed into the reference-audio input of any CosyVoice3 node.

One practical tip: because the times are plain strings, you can wire them from a text node if you're batching variations - crop a few different 5-second windows from the same file and compare clones, which is a genuinely good way to find the strongest reference for a voice.

Installing it

It ships with the pack, so install once and it's always there. ComfyUI Manager: search "FL CosyVoice3". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_FL-CosyVoice3.git
cd ComfyUI_FL-CosyVoice3
pip install -r requirements.txt

Restart ComfyUI afterward. Note that this node itself has no dependencies beyond what ComfyUI already has - but the pack installs heavy stuff (transformers, onnxruntime, openai-whisper) that the synthesis nodes need, so budget for that pip install regardless.

Common gotchas

  • The format of the time strings matters - 0:10 is ten seconds; 1:00 is one minute. The two defaults, 0:00 to 0:10, give you a 10-second clip, which is fine for a clone reference but check you're not accidentally cropping a longer segment than you intended.
  • Start after end - the slice logic just won't give you anything useful if you do. Keep start < end.
  • The output is still bounded by the input - cropping doesn't fix a bad recording; it only isolates the good part. Garbage in, garbage (trimmed) out.

It won't make a hero image, but Audio Crop is the difference between a workflow that throws "audio is too long" errors and one that just runs. Every other node in the pack quietly assumes you have it.

Category🔊FL CosyVoice3/Audio

Inputs (3)

NameTypeDefaultDescription
audioAUDIO—
start_timeSTRING0:00—
end_timeSTRING0:10—

Outputs (1)

NameTypeDescription
audioAUDIO—