Type Alias: KokoroTextToSpeech<K>
KokoroTextToSpeech<
K> =object
Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:123
Kokoro text-to-speech task runner.
Type Parameters
K
K extends PropertyKey = string
Voice keys record constraint.
Properties
dispose()
readonlydispose: () =>void
Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:127
Releases all allocated native resources.
Returns
void
synthesize()
readonlysynthesize: (text,options) =>AsyncGenerator<KokoroTtsChunk>
Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:138
Streams synthesized audio chunks as an async generator as each text chunk finishes.
Parameters
text
string
Input text (or IPA phonemes) to synthesize into speech.
options
Per-call execution options. See KokoroTtsOptions.
Returns
AsyncGenerator<KokoroTtsChunk>
An AsyncGenerator yielding KokoroTtsChunk audio buffers.
Throws
With code INVALID_ARGUMENT if the voice is unknown
or speed is out of range, RESOURCE_BUSY if the model is in use, or
RESOURCE_DISPOSED if disposed.
synthesizeStop()
readonlysynthesizeStop: () =>void
Defined in: extensions/speech/tasks/kokoroTextToSpeech.ts:144
Cancels any in-flight synthesis started by synthesize.
Returns
void