Gemini Diarisation
Split a podcast into speaker tracks
- audio
- speaker_1
- speaker_2
- speaker_3
- speaker_4
This is the pack's most genuinely original node, and it does something you rarely see inside ComfyUI: it takes an audio clip with multiple people talking and splits it into separate audio tracks, one per speaker. Feed it a podcast, a recorded call, or a two-person interview, and you get back up to four isolated AUDIO outputs - speaker_1 talking, speaker_2 talking, and so on.
It's the kind of node that's oddly satisfying to watch work. ComfyUI is built for images and video, so an "audio/diarise" category is already a flex. If you do any sort of audio post-production in ComfyUI - dubbing, voice isolation before TTS, remixing - this is worth a serious look.
How it works
The node sends your audio to Gemini with a carefully constructed prompt asking it to transcribe every utterance with precise timestamps and a speaker label, then slice the source audio by those timestamps. The transcript is returned as structured JSON, the node parses the speaker segments, sorts them by first appearance, and cuts the original waveform into per-speaker tracks.
The output is up to four speaker tracks, and here's the honest detail: if your audio has fewer speakers than four, the unused output slots aren't empty - they're filled with a track of silence (same length as the input). Wire the slots you need; ignore the rest.
The inputs that matter
- audio - the input
AUDIOclip. Get it from a load-audio or VHS node. - num_speakers - 1–10, default 2. This isn't a suggestion: the node tells Gemini it must identify exactly this many speakers. If you set it wrong, the segmentation will be worse, so count your speakers.
- model - same Gemini lineup as the chat node (
gemini-2.5-flashdefault; the pro models are slower but more accurate on overlapping or heavy-accent audio). - temperature (default 0.2) - keep it low; this is transcription, not creativity.
- thinking / thinking_budget (optional) - turn on for messy audio where the model has to reason about who's speaking.
- seed / api_key - key in the field or
.env(GEMINI_API_KEY).
The outputs
speaker_1 through speaker_4 - four AUDIO tracks. Silence-filled when the source has fewer speakers. Route each into a save-audio node to export, or into further processing.
Installing it
One of ~20 nodes in the Aryan185/ComfyUI-ExternalAPI-Helpers pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Aryan185/ComfyUI-ExternalAPI-Helpers.git
cd ComfyUI-ExternalAPI-Helpers
pip install -r requirements.txt
Restart ComfyUI; find "Gemini Diarisation" under audio/diarise. Dependencies: google-genai for the API call, soundfile/numpy for the slicing, and opencv-python rides along in the pack requirements whether you use it or not. Same Gemini key setup as the other Google nodes - paste it in the field or set GEMINI_API_KEY in .env.
Where people get burned
The num_speakers setting is where quality lives and dies. Set it to 2 on a 3-person call and Gemini will mash two people together or invent a third label to fit the constraint. Also, this is an API call over the full audio clip - long files mean bigger requests, slower responses, and (past free-tier limits) real cost. And the silence-in-unused-slots behavior surprises people: if you save all four outputs from a two-person recording, you'll get two files of silence. Know that going in and it's fine.
It's not a polished production tool like a dedicated diarization service - it's Gemini doing a really good job from a prompt. For a free-ish, in-ComfyUI way to separate speakers, that's a trade worth taking.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| num_speakers | INT | 21–10 | — |
| model | COMBO | gemini-3.5-flash | 11 options: gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-flash-lite, gemini-3-flash-preview, +5 |
| api_key | STRING | Directly put Gemini API key or .env variable name (GEMINI_API_KEY) | |
| seed | INT | 690–2147483646 | — |
| temperature | FLOAT | 0.20–2 | — |
| thinkingopt | BOOLEAN | false | — |
| thinking_budgetopt | INT | 0-1–24576 | -1 = auto, 0 = disabled |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| speaker_1 | AUDIO | — |
| speaker_2 | AUDIO | — |
| speaker_3 | AUDIO | — |
| speaker_4 | AUDIO | — |