Timestamp alignment lets you retrieve timing information that matches the generated audio, which is useful for experiences like word highlighting, karaoke‑style captions, and lipsync. The examples and behavior described on this page apply to TTS 1.5 and TTS-2 models (
inworld-tts-1.5-mini, inworld-tts-1.5-max, inworld-tts-2).
For the languages that support timestamp alignment, see the language support table.
timestampType request parameter to control granularity:
WORD: Return timestamps for every token in the original text — words, punctuation, and whitespace — in the exact order they were given, with phoneme-level timing and viseme symbols.CHARACTER: Return timestamps for each character or punctuation
Enabling timestamp alignment can increase latency (especially for the non-streaming endpoint).
WORD:timestampInfo.wordAlignmentwithwords,wordStartTimeSeconds,wordEndTimeSeconds, andphoneticDetails. Thewordsarray covers every token from the original input in order, so the alignment maps back to the full text without gaps.CHARACTER:timestampInfo.characterAlignmentwithcharacters,characterStartTimeSeconds,characterEndTimeSeconds
Streaming behavior
You can control how timestamp data is delivered alongside audio usingtimestampTransportStrategy.
Sync (default)
Audio and alignment arrive together in each chunk. Every chunk contains both audio data and its corresponding timestamps.Async
Audio chunks arrive first, followed by separate trailing messages containing only timestamp data. This reduces time-to-first-audio, since the server doesn’t need to wait for alignment computation before sending audio.timestampTransportStrategy to SYNC or ASYNC in your request. See the API reference for details.
Response structure
Returns alignment data with phoneme-level timing and viseme symbols for lip-sync animation.Phonetic details structure
Each entry inphoneticDetails contains:
Each phone entry contains: