Skip to content

TextToSpeech

Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:80

A loaded text to speech model, from createTextToSpeech(). Calls run one at a time, in order.

readonly sampleRate: number

Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:82

Sample rate of the audio synthesize() returns.

dispose(): void

Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:87

Frees the weights and every GPU buffer the runner holds.

void


synthesize(text, voice, options?): Promise<Float32Array<ArrayBufferLike>>

Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:85

text spoken in voice, mono samples at sampleRate. Throws INVALID_ARGUMENT for a text too long for one pass on this device.

string

Voice

SynthesizeOptions

Promise<Float32Array<ArrayBufferLike>>