Type Alias: SupertonicTextToSpeech<K>
SupertonicTextToSpeech<
K> =object
Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:137
Supertonic text-to-speech task runner.
Type Parameters
K
K extends PropertyKey = string
Voice style keys record constraint.
Properties
dispose()
readonlydispose: () =>void
Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:139
Releases all allocated native models and static execution tensors.
Returns
void
synthesize()
readonlysynthesize: (text,options) =>AsyncGenerator<SupertonicTtsChunk>
Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:153
Streams synthesized audio chunks as an async generator as each text chunk finishes.
Parameters
text
string
Input text string to synthesize into speech.
options
Per-call execution options. See SupertonicTtsOptions.
Returns
AsyncGenerator<SupertonicTtsChunk>
An AsyncGenerator yielding SupertonicTtsChunk audio buffers.
Throws
With code INVALID_ARGUMENT if voice style is
invalid or language is unsupported, RESOURCE_BUSY if the model is in use,
or RESOURCE_DISPOSED if disposed.
synthesizeStop()
readonlysynthesizeStop: () =>void
Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:159
Cancels any in-flight synthesis started by synthesize.
Returns
void