For even lower latency with multiple requests in a session, consider the WebSocket API. For tips on optimizing latency, see the latency best practices guide.
Timestamp Transport Strategy
When using timestamp alignment, you can choose how timestamps are delivered alongside audio usingtimestampTransportStrategy:
SYNC(default): Each chunk contains both audio and timestamps together.ASYNC: Audio chunks arrive first, with timestamps following in separate trailing messages. This reduces time-to-first-audio with TTS 1.5 models.
Code Examples
JavaScript
View our JavaScript implementation example
Python
View our Python implementation example
API Reference
Synthesize Speech Stream
View the complete API specification
Next Steps
Voice Cloning Best Practices
Learn best practices for producing high-quality voice clones.
Speech Generation Best Practices
Learn best practices for synthesizing high-quality speech.
API Examples
Explore Python and JavaScript code examples for TTS integration.