Add Silence To Audio (Batch)
A Breath Between Sentences So Your Audiobook Doesn't Sound Robotic
- audio
- audio
Here's a thing you only learn by listening to chunked TTS output: when you generate audio one text chunk at a time, the pieces come back with no space between them, and the result sounds like someone reading a book in a hurry, sentence ramming into sentence. AddSilenceToAudioBatch is the fix - it tacks a configurable pause onto each audio clip so the final assembled audiobook actually breathes.
It's a deliberately tiny node, one of two audio utilities in the comfyui_epub_tts pack (its sibling, CombineAudioToSingle, does the stitching). In a typical graph it sits between your TTS node and the combiner: TTS → AddSilenceToAudioBatch → CombineAudioToSingle → save.
How it works
The mechanism is unglamorous but worth half a minute because the batch semantics are the subtle part. It takes an AUDIO input - a single audio dict, a list of them, or a nested mix, it flattens whatever you give it - and checks that everything shares one sample rate. Mixed rates are a hard ValueError, and that's your first troubleshooting clue: if you're feeding it clips from different TTS runs or models, resample first.
Each waveform gets normalized to a [batch, channels, samples] shape, everything stacks into one batch, and then the node appends pause_duration seconds of zeros to the end of every item in the batch. That last part is the gotcha: it's silence after each clip, not just between them. There'll be a trailing pause on the last clip too. For 0.5 seconds that's imperceptible; if you set it to 3 seconds it's a slightly awkward tail on your final file.
The inputs that matter
Really just one: pause_duration, a float in seconds, default 0.5, range 0–10 in 0.1 steps. That's the whole interface. The single output is audio - the same AUDIO type that goes in, now with padding - which wires straight into a combiner or a save node.
Where you'll actually reach for the knob: 0.5s is a decent default for general prose, but narration works better around 0.7–1.0s, and if you're using this to separate distinct sections (chapter breaks) rather than sentences, you might push it to 1.5–2s. The node doesn't care whether the pause is a sentence break or a chapter break - that's your call, made in the graph by choosing where you place it.
Install
It ships with the rest of the pack, so the install is identical: ComfyUI Manager, search comfyui_epub_tts, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/kallama/comfyui_epub_tts
No models, no downloads, nothing GPU-related. If you're using it standalone rather than in the EPUB pipeline, that works fine - it's just an AUDIO-in/AUDIO-out utility. About the only way to break it is to hand it mismatched sample rates, and it'll tell you loudly when you do.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| pause_duration | FLOAT | 0.50–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |