Skip to main content
Version: Next

Type Alias: KokoroTtsChunk

KokoroTtsChunk = object

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:127

Audio output chunk yielded by the createKokoroTextToSpeech generator.

Properties​

audio​

readonly audio: Float32Array

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:129

Float32 PCM audio samples for this chunk, normalized in [-1, 1].


chunkIndex​

readonly chunkIndex: number

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:135

Zero-based index of this chunk.


duration​

readonly duration: number

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:133

Duration of this audio chunk in seconds.


sampleRate​

readonly sampleRate: number

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:131

Audio sampling rate in Hz (see KOKORO_SAMPLE_RATE).


totalChunks​

readonly totalChunks: number

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:137

Total number of chunks partitioned from the input text.


words​

readonly words: readonly KokoroTtsWord[]

Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:143

Words of the input text whose speech ends in this chunk, in order. Words with nothing to pronounce (e.g. standalone punctuation) are left out, and the list is empty if the text could not be aligned with its phonemes.