short · 3 min
Text-to-speech
Turning text into spoken audio, often by predicting audio as tokens, where the hard part is how soon the first sound plays.
updated 29 Sept 2026
Picture a voice assistant. You ask it something, and then nothing, for a second or more.
Text-to-speech, TTS, takes text and gives back audio of a voice saying it. In a live app, how soon the first sound plays matters as much as how good it sounds. To see why that's hard, let's look at how a modern TTS model makes audio.
Audio is a very long sequence
Say we want ten seconds of speech. At 24,000 samples a second, that's 240,000 numbers, each one of 65,536 possible values. Predicting that one number at a time would be a ridiculously long, fine-grained job.
Older systems went through a spectrogram, a picture of the sound, and a second model turned that into audio. A newer family, shown off by Microsoft's VALL-E in 2023, turns audio into tokens instead. A neural audio codec is a model trained to squeeze audio into a short list of codes and rebuild the audio from them. The one VALL-E used turns 24 kHz audio into 75 frames a second, 320 times fewer steps. Each frame is 8 codes, each picked from 1,024 options. So our ten seconds becomes a grid of 750 frames by 8 codes.
Once audio is tokens, this is the text generation we already know. A transformer predicts the next audio token from the text and the tokens so far (next-token prediction). In VALL-E, one model predicts the first code of each frame, one frame after another; that code matters most for the sound. A second model fills in the other seven codes for all frames at once. The codec turns the finished grid back into a waveform.
There's a side effect. Start the sequence with a 3-second recording of someone and the model carries on in that voice, even with the same room echo. Copying a voice is now cheap, which is handy and easy to misuse.
And there's a catch that comes with predicting tokens. The same kind of model that loses its place in text can do it in audio. VALL-E's authors heard words come out unclear, missing or doubled, and traced it to the model's attention losing track of where it was in the text.
Back to the silence
So how do we shrink that pause? The audio version of time to first token is called time to first byte, and the fixes are the same ideas as streaming text.
Stream the audio out. A plain endpoint hands back the whole file at the end. A streaming one sends chunks as they're made, so playback starts early.
Stream the text in, too. In a voice app the text usually comes from an LLM, a few tokens at a time. A websocket connection lets us send text in and get audio out at the same time, so the voice can start before the LLM has finished. Watch one thing: the TTS side has to decide when it has enough text to start. If it's set to wait for a fixed amount, it sits idle while tokens trickle in. ElevenLabs has a mode that handles this for you; check what your provider does.
Pick fast parts. ElevenLabs' Flash models take about 75 ms of model time (as of 2026-09), for slightly lower quality. Stock voices are faster than professional clones.
But 75 ms is model time only. With the network on top, ElevenLabs quotes 100 to 200 ms to the first byte, depending on region. So the number worth measuring is time to first audio at the listener's end, not what the model card says.
One caveat: VALL-E is a research model. Commercial providers don't say whether their APIs work the same way.
And the pause after the user stops speaking is only part of the problem. What happens when they start talking again while the voice is still going? That's where voice agents come in.
Further reading
- Latency optimization (ElevenLabs docs), ElevenLabs. Where the delay comes from, with numbers for models, endpoints, voices and regions. Short and practical.
- Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers, Wang et al. (Microsoft), 2023. The VALL-E paper. Section 3 explains the codec grid well.