createKokoroTextToSpeech<
K>(config,runtime?):Promise<KokoroTextToSpeech<K>>
Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:163
Creates a Kokoro Text-to-Speech pipeline.
It validates both sub-model method schemas, builds the grapheme-to-phoneme pipeline, pre-parses the voice files into memory, and registers disposal hooks to release all native resources.
K extends PropertyKey
Voice keys record constraint.
Kokoro TTS pipeline configuration containing model and asset paths. See KokoroTtsModel.
WorkletRuntime
Optional worklet runtime thread on which to run inference.
Promise<KokoroTextToSpeech<K>>
A promise resolving to the instantiated KokoroTextToSpeech runner.
With code LOAD_FAILED if models or voice files
fail to load, SCHEMA_MISMATCH if model schemas do not match the Kokoro
specification, or INVALID_STATE if phonemizer native support is missing.