Skip to main content
Version: Next

Function: createReverbTextToSpeech()

createReverbTextToSpeech<K>(config, runtime?): Promise<ReverbTextToSpeech<K>>

Defined in: extensions/speech/tasks/reverbTextToSpeech.ts:321

Creates a Reverb Text-to-Speech pipeline: speech in the voice of a short recording, in 7 languages.

Type Parameters​

K​

K extends PropertyKey = never

Preset voice keys (inferred from config.voices).

Parameters​

config​

ReverbTtsModel<K>

Paths to the programs, tokenizer, and voices. See ReverbTtsModel.

runtime?​

any

Optional worklet runtime to run inference on.

Returns​

Promise<ReverbTextToSpeech<K>>

The ReverbTextToSpeech runner.

Throws​

With code LOAD_FAILED if an asset fails to load, or SCHEMA_MISMATCH if a program does not match Reverb's.