Extensions/ComfyUI-speech-dataset-toolkit
ComfyUI Extension

ComfyUI-speech-dataset-toolkit

Basic audio tools using torchaudio for ComfyUI. It is assumed to assist in the speech dataset creation for ASR, TTS, etc.

By kale4eat·Created 2 years ago·Updated about a year ago· 23
kale4eat/ComfyUI-speech-dataset-toolkit
Nodes55
On cloudLocal install
Categoryspeech-dataset-toolkit, speech-dataset-toolkit/edit
Stars23
Updatedabout a year ago

Nodes (55)

Audio Property

Read a clip's sample rate

speech-dataset-toolkit
Concat Audio

Stitch two clips together with a silence gap between them

speech-dataset-toolkit/edit
Cut Audio

Remove a section of audio and close the gap

speech-dataset-toolkit/edit
Apply Demucs

Run Demucs and get drums, bass, vocals and other back separately

speech-dataset-toolkit/ai/demcus
Load Demucs

Load Facebook's Demucs to split music into stems

speech-dataset-toolkit/ai/demcus
faster-whisper List Segments

Turn a Whisper transcript into a list you can loop over

speech-dataset-toolkit/ai/faster-whisper
Load faster-whisper

Load Whisper the fast way, with the quantization knobs faster-whisper is built for

speech-dataset-toolkit/ai/faster-whisper
faster-whisper Segment Property

Pull the start time, end time and text out of one Whisper segment

speech-dataset-toolkit/ai/faster-whisper
faster-whisper Text From Segments

Flatten a Whisper transcript into one string

speech-dataset-toolkit/ai/faster-whisper
Transcribe by faster-whisper

Fast, accurate speech-to-text inside a ComfyUI graph

speech-dataset-toolkit/ai/faster-whisper
GriffinLim

Turn a spectrogram back into audio without a neural vocoder

speech-dataset-toolkit/spec
Join Audio

Stitch a whole batch of clips into one, not just a pair

speech-dataset-toolkit/edit
kotoba-whisper List Segments

Explode a kotoba-whisper transcript into per-line segments

speech-dataset-toolkit/ai/kotoba-whisper
Load kotoba-whisper

The configurable kotoba-whisper loader, short or long form

speech-dataset-toolkit/ai/kotoba-whisper
Load kotoba-whisper (Long-Form)

Load kotoba-whisper's long-form Japanese ASR pipeline

speech-dataset-toolkit/ai/kotoba-whisper
Load kotoba-whisper (Short-Form)

Load kotoba-whisper for clips under ~30 seconds

speech-dataset-toolkit/ai/kotoba-whisper
kotoba-whisper Segment Property

Pull start, end, and text off one segment

speech-dataset-toolkit/ai/kotoba-whisper
Transcribe by kotoba-whisper

Flat Japanese transcript text, no segment timing

speech-dataset-toolkit/ai/kotoba-whisper
Transcribe by kotoba-whisper (Long-Form)

Japanese transcription for clips past Whisper's 30-second window

speech-dataset-toolkit/ai/kotoba-whisper
Transcribe by kotoba-whisper (Short-Form)

Fast Japanese transcription for clips under 30 seconds

speech-dataset-toolkit/ai/kotoba-whisper
LFCC

MFCC's linear-frequency sibling, and the one anti-spoofing research actually prefers

speech-dataset-toolkit/spec
Load Audio

The node every graph in this pack starts from

speech-dataset-toolkit
Load Audios

Load a whole folder of clips as one batch

speech-dataset-toolkit
Make Silence Audio

Generate exact silence for padding and gaps

speech-dataset-toolkit/edit
MelSpectrogram

The standard input feature behind most modern TTS

speech-dataset-toolkit/spec
MFCC

The classic hand-crafted speech feature, still useful for lightweight tasks

speech-dataset-toolkit/spec
nemo-asr List Segments

Explode nemo-asr's segments bundle into a list

speech-dataset-toolkit/ai/nemo-asr
nemo-asr List Subwords

Explode nemo-asr's token-level output into a list

speech-dataset-toolkit/ai/nemo-asr
Load nemo-asr

Load ReazonSpeech's NeMo-based Japanese ASR model

speech-dataset-toolkit/ai/nemo-asr
nemo-asr Segment Property

Pull start, end, and text off one nemo-asr segment

speech-dataset-toolkit/ai/nemo-asr
nemo-asr Subword Property

Token, token ID, and timestamp for one subword

speech-dataset-toolkit/ai/nemo-asr
Transcribe by nemo-asr

Text, subwords, and segments from one node, no config knobs

speech-dataset-toolkit/ai/nemo-asr
Load nue-asr

Load rinna's nue-asr, built for natural-sounding transcripts rather than strict verbatim

speech-dataset-toolkit/ai/nue-asr
Transcribe by nue-asr

The flat-text half of rinna's natural-sounding ASR

speech-dataset-toolkit/ai/nue-asr
Play Audio

Preview a clip without leaving the graph

speech-dataset-toolkit
Plot MelFilterBank

See the mel filters before you trust a mel spectrogram

speech-dataset-toolkit/visualize
Plot Pitch

Eyeball a clip's intonation contour

speech-dataset-toolkit/visualize
Plot Specgram

Straight from audio to a spectrogram image, one node

speech-dataset-toolkit/visualize
Plot Spectrogram

Render an already-computed SPEC into a viewable image

speech-dataset-toolkit/visualize
Plot WaveForm

The fastest sanity check on any clip

speech-dataset-toolkit/visualize
Resample Audio

Change sample rate without the quality hit of a naive resample

speech-dataset-toolkit/edit
Save Audio

Save clips as wav, mp3, flac — or the oddball formats ASR datasets actually use

speech-dataset-toolkit
Save Audio With Sequential Numbering

Save a batch without hand-naming every file

speech-dataset-toolkit
Silence Audio

Mute a section without shortening the clip

speech-dataset-toolkit/edit
Apply Silero VAD

Find the speech timestamps in a long recording

speech-dataset-toolkit/ai/SileroVAD
SileroVAD Collect Chunks

Turn VAD timestamps into a speech-only clip

speech-dataset-toolkit/ai/SileroVAD
SileroVAD List Timestamps

Explode a VAD run into individual segments

speech-dataset-toolkit/ai/SileroVAD
Load Silero VAD

Load the voice-activity detector that finds where people are actually talking

speech-dataset-toolkit/ai/SileroVAD
SileroVAD Timestamp Property

Pull the actual start/end seconds out of a VAD segment

speech-dataset-toolkit/ai/SileroVAD
Spectrogram

The linear-frequency alternative to a mel spectrogram

speech-dataset-toolkit/spec
Load SpeechMOS

Load an automatic 'how natural does this sound' scorer

speech-dataset-toolkit/ai/SpeechMOS
SpeechMOS Score

A naturalness number for a clip, no reference audio needed

speech-dataset-toolkit/ai/SpeechMOS
Split Audio

Cut one clip into two at a timestamp

speech-dataset-toolkit/edit
Trim Audio

Keep exactly the slice of audio you want

speech-dataset-toolkit/edit
Trim Audio By Sample

Trim to an exact sample index, not a rounded timestamp

speech-dataset-toolkit/edit
Readme

ComfyUI-speech-dataset-toolkit

Overview

Basic audio tools using torchaudio for ComfyUI. It is assumed to assist in the speech dataset creation for ASR, TTS, etc.

[!NOTE] The AUDIO type in this repository is compatible with the official implementation. (as of February 7, 2025).

Features

Requirement

Install torchaudio according to your environment.

cd custom_nodes
git clone https://github.com/kale4eat/ComfyUI-speech-dataset-toolkit.git
cd ComfyUI-speech-dataset-toolkit
pip3 install torchaudio --index-url https://download.pytorch.org/whl/cu121
pip3 install -r requirements.txt

If you use silero-vad, install onnxruntime according to your environment.

pip install onnxruntime-gpu

Usage

At first startup, audio_input and audio_output folder is created.

ComfyUI
├── input
│   └── audio_input
├── output
│   └── audio_input
├── custom_nodes
│   └── ComfyUI-speech-dataset-toolkit
...

Fisrt of all, use a Load Audio node to load audio.

Load Audio node

Please put the audio files you wish to process in a audio_input folder in advance. If you've added files while the app is running, please reload the page (press F5). You can use LoadAudio, which is official implementation of ComfyUI.

audio, the data type of ComfyUI flow, consists of waveform and sample rate. Many nodes of this extension handle this data. Note that waveform is torch.Tensor and has batch dim.

For example, Demucs separate drums, bass, vocals and other stems. Each of them is audio data.

Apply demucs node

Finally, use a Save Audio node to save audio. The audio is saved to audio_output folder. You can also use SaveAudio implemented by ComfyUI.

Save Audio node

Note

There are some unsettled policies, destructive changes may be made.

This repository does not contain the nodes such as numerical operations and string processing.

Inspiration