Skip to main content
Version: 0.10.0

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()

readonly dispose: () => void

Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:139

Releases all allocated native models and static execution tensors.

Returns

void


synthesize()

readonly synthesize: (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

SupertonicTtsOptions<K>

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()

readonly synthesizeStop: () => void

Defined in: extensions/speech/tasks/supertonicTextToSpeech.ts:159

Cancels any in-flight synthesis started by synthesize.

Returns

void