A single streaming PCM audio chunk emitted by TextToSpeechStream.
Signature:
export declare interface TextToSpeechAudioChunk
Properties
| Property | Type | Description |
|---|---|---|
| chunkIndex | number | 0-based index of this chunk within the streaming session. |
| isFinal | boolean | Whether this is the final chunk in the stream. |
| sampleRateHz | number | Audio sample rate in Hz (e.g. 24000). |
| samples | Float32Array | Synthesized 32-bit mono float PCM audio samples in [-1.0, 1.0]. |
| wordTimestamps | WordTimestamp[] | Optional word-level timing alignments for this chunk. |
TextToSpeechAudioChunk.chunkIndex
0-based index of this chunk within the streaming session.
Signature:
chunkIndex: number;
TextToSpeechAudioChunk.isFinal
Whether this is the final chunk in the stream.
Signature:
isFinal: boolean;
TextToSpeechAudioChunk.sampleRateHz
Audio sample rate in Hz (e.g. 24000).
Signature:
sampleRateHz: number;
TextToSpeechAudioChunk.samples
Synthesized 32-bit mono float PCM audio samples in [-1.0, 1.0].
Signature:
samples: Float32Array;
TextToSpeechAudioChunk.wordTimestamps
Optional word-level timing alignments for this chunk.
Signature:
wordTimestamps?: WordTimestamp[];