Arcane OS Docs Development only

Reference

Arcane.speech.transcribe()

Sends bounded canonical base64 bytes labeled audio/webm to local Whisper through the native host. The bridge validates encoding, label, and bounds; the fixed service parses the media container. Requires ai.inference.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.speech.transcribe(request)

Parameters

request: SpeechTranscriptionRequest

Return value

Promise<SpeechTranscriptionResult>

Description

Sends bounded canonical base64 bytes labeled audio/webm to local Whisper through the native host. The bridge validates encoding, label, and bounds; the fixed service parses the media container. Requires ai.inference.

Overview

Arcane.speech.transcribe(request) sends bounded caller-supplied audio bytes, labeled as WebM, to the fixed local transcription service. Use it after local capture permission and recording have succeeded; the method itself does not capture audio or grant microphone permission.

Parameters

audioBase64 is required canonical base64: at most 8 MiB encoded and 1 byte through 6 MiB decoded. mimeType defaults to "audio/webm"; codec parameters may follow, but the base type must be WebM. model defaults to "whisper-small". Core accepts the bounded Whisper-name pattern while the current Android provider requires exactly "whisper-small". The host validates the label, encoding, and size; the fixed service decodes the media container.

Return value

It resolves to {text} with a trimmed transcript from a response bounded to 64 KiB.

Availability

This method requires ai.inference and ready local transcription. It is available on desktop Core and to explicitly admitted applications through the Android projection. Browser capture permission is separate from method admission.

Errors and recovery

Correct invalid base64, size, MIME, or model errors before retrying. Unavailable, request-failed, response-too-large, and invalid-response errors require a status refresh or managed recovery. On Android, wait for owned speech work after ANDROID_SPEECH_QUEUE_FULL.

Streaming, cancellation, and events

Transcription resolves one complete text result and emits no method event. The wrapper timeout is 180 seconds and no signal is exposed. Core and Android do not promise cancellation when the renderer stops waiting.

Example

async function transcribeRecordedWebM(audioBase64) {
    const result = await globalThis.Arcane.speech.transcribe({
        audioBase64: audioBase64,
        mimeType: 'audio/webm',
        model: 'whisper-small'
    });
    return result.text;
}

Reference group

AI and Ollama

Repository and reviewed source access