Reference
Arcane.speech.synthesize()
Synthesizes bounded local speech through the native host and fixed loopback runtime. Requires ai.inference.
This focused page is derived from the mechanically checked full member inventory.
Syntax
Arcane.speech.synthesize(request)
Parameters
request: SpeechSynthesisRequest
Return value
Promise<SpeechSynthesisResult>
Description
Synthesizes bounded local speech through the native host and fixed loopback runtime. Requires ai.inference.
Overview
Arcane.speech.synthesize(request) converts bounded text to local speech. Use
it only after checking synthesis readiness, and create an audio URL from the
returned bytes without logging the base64 payload.
Parameters
request uses the portable fields input, model, voice,
responseFormat, and speed. input is required, trimmed, nonempty, and at
most 4,000 characters. Defaults are model: "kokoro", voice: "af_heart",
responseFormat: "opus", and speed: 1. The voice matches
[a-z0-9][a-z0-9_-]{0,63}, the format is "opus" or "wav", and speed is
0.5-2 inclusive. Send documented types; do not rely on host coercion of
off-contract values.
Return value
It resolves to {audioBase64, contentType}. The canonical base64 represents
1 byte through 6 MiB of audio, and contentType is "audio/ogg" or
"audio/wav" matching the selected format.
Availability
This method requires ai.inference and a ready fixed local speech provider.
It is available on desktop Core and to explicitly admitted applications through
the Android projection. Android bounds speech work to one active and one queued
operation.
Errors and recovery
Correct INVALID_LOCAL_SPEECH_REQUEST locally. Unavailable, request-failed,
response-too-large, or invalid-response errors require a health refresh or
managed recovery. On Android, ANDROID_SPEECH_QUEUE_FULL means wait for the
owned active operation before retrying.
Streaming, cancellation, and events
Synthesis returns one complete audio result and emits no method event. The wrapper timeout is 180 seconds, no signal is exposed, and timeout or page teardown does not promise cancellation of Core or Android speech work.
Example
const result = await globalThis.Arcane.speech.synthesize({
input: 'Your local speech service is ready.',
voice: 'af_heart',
responseFormat: 'opus',
speed: 1
});
console.info(result.contentType, result.audioBase64.length);