ChatTTS Text Splitter
Feeding long text without melting your VRAM
- STRING
Feed ChatTTS a whole article in one go and quality drops, VRAM spikes, and long sentences start sounding strained. The Splitter is the fix: it cuts your text into chunks the sampler can chew on, sized to fit your GPU. It's a preprocessing node with a single job - and a slightly surprising way of doing it.
How it works
You give it text and a split_method, it returns a STRING - one string, not a list. That's the part that catches people off guard. The splitter doesn't hand you separate chunks to process individually; it splits your text and then joins it back together with newlines. The reason: the Sampler's split_batch setting (anything above 0) is what actually tells ChatTTS to treat newline-separated lines as a batch. So this node and split_batch are a pair - the splitter prepares the text, the sampler executes the batching.
The settings
text- required, multiline. Usually the output of a Text Normalizer if you have one upstream, or raw script text.split_method- pick the granularity:newline(default) - splits on the line breaks you already wrote. Predictable and honest: you control the chunk boundaries.sentences- splits after.,!, and?. Good for prose where paragraphs are too long.paragraphs- splits on blank lines. Coarsest option; fine if your paragraphs are short.none- leaves the text untouched. There to make the node pass-through when you want the same graph shape everywhere.
max_batch_size(1–32, default 4) - the cap on how many chunks survive. If your text splits into more than this, the extras get dropped. So it's a limit on both batch size and how much of your text actually gets spoken. Keep it in line with what your GPU handled before.
Where it fits
Text (Normalizer →) TextSplitter → ChatTTS_Sampler (split_batch: 4)
Set the splitter's max_batch_size and the sampler's split_batch to the same number and you have a long-form pipeline that's reproducible. For short one-liners, skip it entirely - it's overhead. For anything over a couple of paragraphs, it's the difference between a smooth read and a garbled one.
The one trap to remember: because oversized chunks are silently truncated, a missing sentence at the end of a long script usually means your max_batch_size was too small, not that the model "ate" your text. Nudge the number up and rerun.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| split_method | COMBO | newline | 4 options: newline, sentences, paragraphs, none |
| max_batch_sizeopt | INT | 41–32 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |