WordTimestamp interface

Word-level timing alignment mapping an input word to audio seconds.

Signature:

export declare interface WordTimestamp 

Properties

Property Modifiers Type Description
word string Original surface word token from the input text.
startChar number Zero-based UTF-16 code unit index of the start of word in the input text (compatible with String.prototype.slice(startChar, endChar)).
endChar number Zero-based UTF-16 code unit index of the end of word (exclusive) in the input text (compatible with String.prototype.slice(startChar, endChar)).
startSec number Estimated start time in seconds within the synthesized audio waveform.
endSec number Estimated end time in seconds within the synthesized audio waveform.

WordTimestamp.word

Original surface word token from the input text.

Signature:

word: string;

WordTimestamp.startChar

Zero-based UTF-16 code unit index of the start of word in the input text (compatible with String.prototype.slice(startChar, endChar)).

Signature:

startChar: number;

WordTimestamp.endChar

Zero-based UTF-16 code unit index of the end of word (exclusive) in the input text (compatible with String.prototype.slice(startChar, endChar)).

Signature:

endChar: number;

WordTimestamp.startSec

Estimated start time in seconds within the synthesized audio waveform.

Signature:

startSec: number;

WordTimestamp.endSec

Estimated end time in seconds within the synthesized audio waveform.

Signature:

endSec: number;