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.
Properties
Section titled “Properties”sampleRate
Section titled “sampleRate”
readonlysampleRate:number
Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:82
Sample rate of the audio synthesize() returns.
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: packages/runntime/src/zoo/tasks/audio/textToSpeech.ts:87
Frees the weights and every GPU buffer the runner holds.
Returns
Section titled “Returns”void
synthesize()
Section titled “synthesize()”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.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<Float32Array<ArrayBufferLike>>