TextToSpeechResult interface

The synthesized audio output from a single synthesize() call.

Signature:

export declare interface TextToSpeechResult 

Properties

Property Type Description
sampleRateHz number Sample rate of the output audio in Hz (typically 24000).
samples Float32Array Synthesized mono PCM audio samples in the range [-1.0, 1.0].
wordTimestamps WordTimestamp[] | undefined Estimated word-level timestamps for the synthesized speech.

TextToSpeechResult.sampleRateHz

Sample rate of the output audio in Hz (typically 24000).

Signature:

sampleRateHz: number;

TextToSpeechResult.samples

Synthesized mono PCM audio samples in the range [-1.0, 1.0].

Signature:

samples: Float32Array;

TextToSpeechResult.wordTimestamps

Estimated word-level timestamps for the synthesized speech.

Signature:

wordTimestamps?: WordTimestamp[];