Nodes/Music Production Toolkit/Instrumental check · words heard
ComfyUI Node

Instrumental check · words heard

Is it really instrumental? Transcribe it and count the words

By jplenio·Created 19 days ago·Updated a day ago· 55
Instrumental check · words heard
  • audio
  • audio
  • check_report_json
word_tolerance0
whisper_modelwhisper-large-v3
languageauto
deviceauto
compute_typeauto
beam_size1
candidate_label

Music generation models are bad at silence. Ask YuE2 for an instrumental cover and it will often give you an instrumental with somebody humming, or a whole chorus arriving in the second half like it read the brief and disagreed. The score can be provably vocal-free - in the toolkit's instrumental mode the vocal part is muted and its melody moves into the instrumental block - and the render can still contain a voice.

So this node is a listening test. It transcribes one generated take with Whisper, counts the words it heard, and reports. That's the whole thing.

The mechanism, and why the settings look odd for music

The node writes the take to a temporary WAV and runs it through faster-whisper, then counts whitespace-separated words in the resulting text. An instrumental passes when that count is at or below your tolerance.

Two defaults are deliberately not the defaults you'd use for speech:

  • vad_filter is off. Whisper's voice-activity detection is tuned for speech and will happily clip sung fragments out, which would defeat the entire purpose of a check whose job is to hear anything voice-like at all.
  • condition_on_previous_text is off. Carrying text between chunks is a documented way to get one line repeated into the next section, and you're already suspicious of what the model is doing.

The audio itself is passed through untouched. This node measures; it never processes. That's why it belongs right after decode, on the raw render - refinement, EQ and mastering change how a track sounds but not whether someone's singing.

Inputs that matter

audio is the take. word_tolerance (0–50, default 0) is the only real judgement call: 0 means no recognisable word at all, and a stray syllable will fail the take. Set it to 1 or 2 if you're chasing ghosts.

Then the engine knobs, all with sensible defaults: whisper_model (the pinned whisper-large-v3 unless you've added another CTranslate2 checkpoint to models_config.json), language (auto, or pin the language you know is being sung - misdetection on music is common), device (auto prefers CUDA and falls back to CPU on GPU failure), compute_type (auto = float16 on CUDA, int8 on CPU), and beam_size (1–10, default 1 - fastest, and for a word count you rarely need more). candidate_label names the take in the log, the report and its WAV file; the generation expansion sets it to take-1, take-2 and so on.

Outputs are audio - the same samples back, so it slots between decode and everything else - and check_report_json, which carries the transcript, the count, the tolerance, pass/fail, and the temp file path.

Reading the log

You get a line per take with every word Whisper heard:

Instrumental vocal check take-2: Whisper heard 4 words: hold on to me now
Instrumental vocal check take-2: 4 words (tolerance 0) -> voice detected

Long transcripts get cut to 500 characters in the log with the total length appended; the full text stays in the JSON. A take Whisper hears nothing in says so explicitly rather than logging nothing at all.

That log is the actual deliverable. Humming without words and a returning chorus both "fail" a tolerance of 0, but only one of them means your render has lyrics in it.

You don't add this node yourself

Like its partner, this node is created inside the pack's generation expansion when the instrumental_check toggle in the Music settings node is on, one instance per candidate take. It's only used for YuE2 instrumental covers; other models and modes skip it. If you're reading this because you want to understand the graph, that's the graph - you toggle a setting, the pack builds the nodes.

Install

The pack itself:

cd ComfyUI/custom_nodes
git clone https://github.com/jplenio/ComfyUI-MiniMax-Music-Production-Toolkit.git
cd ComfyUI-MiniMax-Music-Production-Toolkit
python -m pip install -r requirements.txt

This node is the reason faster-whisper is in that file - it pulls CTranslate2, PyAV, ONNX Runtime and Tokenizers, and it never touches your installed PyTorch. If you're on an older install, python -m pip install -r requirements-whisper.txt adds just that engine. The checkpoint isn't bundled: keep whisper_models and auto_download on in the model check node and it fetches the pinned large-v3 files (about 2.9 GB) into models/audio_encoders/whisper-large-v3.

Where it goes wrong

faster-whisper is not installed names the right file in the error - install it into the ComfyUI Python environment and restart, not into your system Python.

Whisper checkpoint folder ... does not exist usually means the folder name and the whisper_model value have drifted apart. They have to match the directory under models/audio_encoders.

A GPU stall times out and retries on CPU/int8, and after one CUDA failure later auto runs stay on CPU for that ComfyUI session - so if your checks suddenly got slow, that's why, and a restart resets it.

And the honest caveat: automatic speech recognition on sung material is not ground truth. It will hallucinate words over loud music. The node gives you evidence, not a verdict - the verdict is still yours, with your ears.

CategoryMiniMax Music Production Toolkit/generation

Inputs (8)

NameTypeDefaultDescription
audioAUDIOComfyUI AUDIO signal to process. The node preserves channel layout unless its processing explicitly states otherwise; check the node's Info/JSON output for sample-rate or level changes.
word_toleranceINT00–50How many recognised words still count as an instrumental. Words, not letters: 0 means the render must not contain a recognisable word at all.
whisper_modeloptSTRINGwhisper-large-v3Whisper checkpoint used for the check. The pinned whisper-large-v3 checkpoint is downloaded by the model preflight when it is missing.
languageoptSTRINGautoLanguage hint for the check, or auto to detect it. Detection is usually right; pin a language when you know the source to avoid misdetection.
deviceoptSTRINGautoWhere Whisper runs. auto prefers CUDA and falls back to CPU after a GPU failure; cuda or cpu pins it explicitly.
compute_typeoptSTRINGautoPrecision of the Whisper engine. auto uses float16 on CUDA and int8 on CPU.
beam_sizeoptINT11–10Beam width of the transcription. 1 is fastest; higher values hear slightly more and take longer.
candidate_labeloptSTRINGName of this take in the log, the report and its temporary WAV file. The generation expansion passes take-1, take-2, ...; empty uses take.

Outputs (2)

NameTypeDescription
audioAUDIO
check_report_jsonSTRING