stablyai/orca · error

${RPC error message}

Error message

${RPC error message}

What it means

Thrown by startMobileDictationDesktopSession when speech.dictation.start returned {ok:false}. It is thrown inside a try block whose catch runs cleanup (cancel RPC, clearActiveId, idle status) and only re-throws to the caller if the session is still current and enabled. So this error represents the host refusing to start the remote dictation session.

Source

Thrown at mobile/src/hooks/mobile-dictation-desktop-start.ts:70

  setIdleIfGenerationCurrent(options)
  const cleanups: Promise<unknown>[] = [
    client.sendRequest('speech.dictation.cancel', { dictationId })
  ]
  if (releaseKeepAwake) {
    cleanups.push(keepAwakeOwner.release(dictationId))
  }
  await Promise.allSettled(cleanups)
}

export async function startMobileDictationDesktopSession(
  options: StartMobileDictationDesktopSessionOptions
): Promise<boolean> {
  const { client, dictationId, keepAwakeOwner } = options

  try {
    const response = await client.sendRequest('speech.dictation.start', { dictationId })
    if (!response.ok) {
      throw new Error(response.error.message)
    }
  } catch (err) {
    const wasCurrent = isCurrentStart(options)
    options.clearActiveId(dictationId)
    await client.sendRequest('speech.dictation.cancel', { dictationId }).catch(() => undefined)
    // Awaited cleanup may overlap a newer start; stale work must not reset or
    // report over the replacement session.
    const shouldReport = wasCurrent && canReportStartFailure(options)
    setIdleIfGenerationCurrent(options)
    if (!shouldReport) {
      return false
    }
    throw err
  }

  if (!isCurrentStart(options)) {
    await cancelStaleStart(options, { releaseKeepAwake: false })
    return false

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Ensure fetchDictationSetup reports isDictationReady(setup) === true (enabled + selectedModelId with status 'ready') before invoking start.
  2. On a 'session_already_active' style code, call speech.dictation.cancel for any stale dictationId, then retry start once.
  3. Check the desktop's microphone permission and speech runtime status in the host logs.
  4. If the host build is too old, route the user to the desktop upgrade flow.

Example fix

// before
const response = await client.sendRequest('speech.dictation.start', { dictationId })
if (!response.ok) {
  throw new Error(response.error.message)
}

// after — attach the code so the catch can branch
const response = await client.sendRequest('speech.dictation.start', { dictationId })
if (!response.ok) {
  const err = new Error(response.error.message) as Error & { code?: string }
  if (response.error?.code) err.code = response.error.code
  throw err
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Confirm dictation is ready before starting
const setup = await fetchDictationSetup(client)
if (!isDictationReady(setup)) throw new Error('Dictation is not ready')

Type guard

function isSessionAlreadyActive(err: unknown): boolean {
  return (err as any)?.code === 'session_already_active'
}

Try / catch

try {
  return await startMobileDictationDesktopSession(options)
} catch (err) {
  if (isSessionAlreadyActive(err)) {
    await client.sendRequest('speech.dictation.cancel', { dictationId }).catch(() => undefined)
    return await startMobileDictationDesktopSession(options)
  }
  throw err
}

Prevention

When it happens

Trigger: client.sendRequest('speech.dictation.start', {dictationId}) returns {ok:false}. Causes: desktop speech subsystem not ready, model not loaded, another dictation session already active, host lacks mic permission, host build does not support the start contract.

Common situations: User taps mic before the model finished loading on desktop; the desktop's speech runtime crashed; another mobile device started dictation on the same host; the desktop OS denied microphone access to Orca.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/767b50555416da84. Report an issue: GitHub.