Services

Accelerators

Resources

Company

Services

Accelerators

Resources

Company

/

Text to speech

TTS (text to speech)

Text to speech (TTS), or speech synthesis, turns text into audio that sounds like a person speaking. In a voice AI agent it speaks the reply the LLM wrote. Small open models such as Kokoro-82M (Apache-2.0) run on a CPU; larger ones clone voices or add emotion.

How it works

The model converts text into sounds, predicts timing and pitch, and generates audio samples. Good systems stream: they send the first chunk of audio as soon as it is ready instead of waiting for the whole sentence. The metric that matters is time to first byte (TTFB), the delay before the caller hears anything.

For example, a two-second sentence that is made in full before playing leaves about two seconds of silence. Streamed, the first audio arrives in about 300 ms and the rest follows while it plays. Text also needs to be written for speaking: “4:30 pm” should become “four thirty pm”.

Why it matters in production

TTS is easy to overlook and often the first thing to break under load. In One2N’s load test of a self-hosted voice agent, TTS time to first byte rose from 341 ms at 10 calls to 2.3 s at 100, while speech to text and the LLM stayed flat. Check that your TTS server streams, load-test it, and check the model’s licence before shipping it.

See also

On the One2N blog

References

  1. Kokoro-82M (Hugging Face)

  2. Speech synthesis (Wikipedia)

Comic about text to speech (TTS): the LLM writes you are booked for Thursday at 4:30 pm, about 2 s of audio; buffered TTS makes all 2 s before playing, so the caller hears nothing until 2 s and asks if anyone is there; streaming starts playing at 0.3 s; the agent watches time to first byte, 0.3 s, and writes 4:30 pm as four thirty pm so it is never read as four three zero.

Putting this into practice?

Talk to One2N about our AI engineering services

Talk to One2N about our AI engineering services