Sentence chunking for TTS
/AI/4 min read
Between the LLM's token stream and the voice sits a small piece of code deciding when there is enough text to speak. Waiting for a full 18-word sentence costs 0.47 s; speaking at the first comma costs 0.18 s; four words, 0.10 s — each cut trading a little naturalness for speed.
A language model produces text a token at a time. A text-to-speech engine wants text to speak. Between them, in every cascaded voice agent, is a small and surprisingly consequential component: the chunker, which decides when enough text has arrived to send to the voice.
Send too little and the speech sounds broken — a voice reading two words at a time cannot place the stress or the intonation of a sentence it has not seen. Send too much and the user waits in silence for text that is already partly written.
Why not one token at a time?
Speech depends on context in a way text does not. The word "read" is pronounced differently in "I will read" and "I have read". A question rises at the end; a statement falls. Emphasis in "I didn't say that" and "I didn't say that" changes the meaning.
A TTS model given a fragment has to guess all of this. Given a full sentence, it can see where the sentence goes and shape the whole thing. So chunking trades latency against prosody: the more text the TTS sees at once, the more natural it sounds and the longer the user waits for it.
How long each choice costs
At a generation speed of 50 tokens per second and about 1.3 tokens per word:
| send to TTS when there is… | typical length | wait for the text |
|---|---|---|
| a complete sentence | 18 words · 23 tokens | 0.47 s |
| the first clause (comma, dash, colon) | 7 words · 9 tokens | 0.18 s |
| a minimum of 4 words | 4 words · 5 tokens | 0.10 s |
This is added directly to time to first audio — on top of the model's time to first token and the TTS engine's own start-up. Moving from full sentences to clauses for the first chunk saves about 0.3 seconds, a large share of a voice agent's whole budget.
The usual strategy: early first, full later
Only the first chunk's wait is directly heard. Once audio is playing, the next chunk is generated and synthesised while the user listens, and the model is many times faster than speech. So most systems:
- Cut the first chunk early — at the first clause boundary, or after a small minimum number of words, whichever comes first.
- Cut later chunks at sentence boundaries, giving the TTS full sentences for natural prosody, since their latency is hidden.
- Flush at the end of the reply, whatever is left.
The first-chunk rule can also be helped by the prompt: replies that begin with a short, complete phrase — "Sure." "Got it." "Okay, so" — give the chunker a natural early cut.
Where boundaries are not what they look like
A naive chunker that cuts on every full stop gets these wrong:
- Abbreviations: "Dr. Patel", "e.g. this", "Mr. and Mrs."
- Numbers: "3.5 percent", "version 2.1.4", "£1,250.00"
- Lists and URLs: "example.com/help", "1. Open the app"
- Quotations: a full stop inside quotation marks that does not end the outer sentence
Each wrong cut splits a phrase the voice should have read as one, producing an audible break in the middle: "Doctor. Patel will see you." Chunkers use rules for the common cases, look at what follows the full stop (a capital letter and a space is a stronger signal than a digit), and avoid cutting inside numbers and URLs entirely.
Text normalisation belongs here too
The chunker is usually where text is also prepared for speaking: expanding "£1,250" to "one thousand two hundred and fifty pounds", "3pm" to "three p m", "Dr." to "Doctor", and removing anything a voice should not read — markdown asterisks, bullet characters, code blocks. A language model writing for the screen will happily produce all of these unless told it is writing for speech; a normaliser catches what slips through.
Per-chunk costs
Every chunk is a separate request to the TTS engine, and each request has some fixed overhead before audio comes back. If chunks are synthesised one after another, very small chunks multiply that overhead. Streaming TTS engines that accept a continuous text stream over one connection avoid this, which is one reason they are preferred for voice agents.
There is also a quality cost at chunk boundaries: each chunk is synthesised with its own intonation contour, so the seams can be audible as a slight reset. Engines that accept preceding text as context — "this is what was just said" — can smooth the join.
What to take away
The chunker decides when the LLM's text is enough to speak. Waiting for a full sentence costs about 0.47 s; a first clause about 0.18 s; four words about 0.10 s — and the first chunk's wait is added straight onto time to first audio.
Cut the first chunk early, later chunks at sentence ends where the latency is hidden, avoid false boundaries in abbreviations and numbers, and normalise the text for speech on the way through.