Save bark speaker .npz
The end of the voice-cloning workflow
- semantic_prompt
- coarse_prompt
- fine_prompt
This is the node that turns a voice you like into a reusable file. save_speaker_npz takes the three token arrays - semantic, coarse, and fine - and writes them to ComfyUI/models/bark/speakers/<name>.npz, which is exactly the format load_speaker_npz reads back later. One workflow builds a speaker, another workflow consumes it. This is the build side.
The full voice-cloning chain
To make a speaker you need to extract all three token types from a reference audio clip. The pack ships the pieces, wired in this order:
load_bark_hubert+bark_hubert_encode(layer 9) turn your audio into HuBERT vectors, thenbark_hubert_quantizemaps those to semantic tokens - this gives you thesemantic_prompt.encodec_loader+encodec_encodeturn the same audio into the full 8-codebook EnCodec array - that's your fine prompt.bark_encodec_coarseifytakes that array and keeps only the first 2 rows - that's your coarse prompt.- All three feed this node, which saves them together.
The inputs
- name - the filename, without extension. Default
speaker; the node appends.npzitself. Soname = "dave"producesdave.npzin the speakers folder. Overwriting an existing name silently replaces the file. - semantic_prompt (
BarkSemanticTokens) - frombark_hubert_quantize(voice cloning) orbark_generate_semantic(if you're building a speaker from a generated take you liked). - coarse_prompt (
EncodecCodeBooks) - frombark_encodec_coarseify. - fine_prompt (
EncodecCodeBooks) - fromencodec_encode.
It's an output node (OUTPUT_NODE = True in the source), so it has no outputs - you wire tokens in, it saves to disk, done. You'll see it in the list of execution nodes and it marks the workflow as "finished" when it runs.
Install & practical notes
Standard pack install - ComfyUI Manager, search "Audio nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/gitmylo/ComfyUI-audio-nodes
then restart.
Practical advice from actually running this: use a clean, dry reference clip - 5β10 seconds of a single speaker, no background music, no overlapping voices. The quality of your speaker file is capped by the quality of that reference, and you can't fix a bad reference downstream. The main disappointment to manage expectations on: Bark's speaker cloning is "same character" more than "same human." It captures delivery and timbre surprisingly well, but it won't pass for a forensic copy of someone's voice, and it shouldn't be used as one either. Also worth knowing: you can build a speaker from a generated clip you love just by capturing the three token outputs mid-pipeline and running them into this node - no HuBERT chain needed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | speaker | β |
| semantic_prompt | BarkSemanticTokens | β | |
| coarse_prompt | EncodecCodeBooks | β | |
| fine_prompt | EncodecCodeBooks | β |
Outputs (0)
No outputs