-
Pick the fastest model -
inworld-tts-2-flashdelivers 20 ms time to first audio byte (P90, measured server-side) — 5× faster thaninworld-tts-2at 100 ms. If your use case doesn’t need steering or professional voice cloning, Flash is the fastest (and cheapest) choice. - Stream TTS output - Instead of waiting for the entire generation (which may take some time if it is long), you can start playback as soon as the first chunk arrives so that the user doesn’t have to wait. Inworld’s websocket streaming should be the lowest-latency option, but streaming over HTTP will also be superior to a non-streaming setup.
- Chunk streaming LLM output into TTS - For the fastest time to first audio, consider breaking streaming LLM output into sentence chunks and sending them one by one to TTS. The Inworld Agent Runtime provides built-in tools to handle this in a performant manner.
-
Turn off text normalization - Server-side text normalization adds slight latency to each request. For latency-sensitive applications, set
applyTextNormalizationtoOFFand have your LLM or application write numbers, dates, and symbols in spoken form instead. -
Minimize network distance - Time to first audio includes the network round trip between your servers and ours, so run your backend as close to Inworld as your infrastructure allows. Besides the default US deployment, Inworld runs regional deployments in the EU (
api.eu.inworld.ai) and India (api.in.inworld.ai) that remove the intercontinental round trip for region-local users. If you need a region we don’t cover yet, drop us a note — and for full control over placement, consider an on-premises deployment. - Use JWT authentication to stream directly to the client - For applications like mobile apps or browser-based experiences, use JWT authentication to stream TTS directly to the client rather than proxying through your server and adding extra latency.
-
Reuse connections with keep-alive - The first request to the API incurs a TCP and TLS handshake. Use
Connection: keep-alive(and persistent sessions in Python) to reuse the established connection on subsequent requests. See our low-latency Python and JavaScript examples for this technique in practice. -
Don’t wait for the context acknowledgment (WebSocket) - When using the WebSocket API, messages are processed in order per connection. Send each message as soon as it is ready instead of waiting for the
contextCreatedacknowledgment — waiting adds a full network round trip before the first audio chunk. See our low-latency WebSocket examples for this pattern in practice. -
Use ASYNC timestamp transport (WebSocket) - If you request word timestamps, set
timestampTransportStrategy: "ASYNC"so audio chunks are delivered as soon as they are ready, with timestamps following separately. The defaultSYNCmode holds each audio chunk until its timestamps are computed, which delays time-to-first-audio.
Next Steps
Looking for more tips and tricks? Check out the resources below to get started!Voice Cloning Best Practices
Learn best practices for producing high-quality voice clones.
Generating Naturally Sounding Speech
Voice selection, writing for the ear, steering, and LLM prompting for natural speech.
API Examples
Explore Python and JavaScript code examples for TTS integration.