moeru-ai/airi · error · Error

System audio lipsync is not available in this runtime

Error message

System audio lipsync is not available in this runtime

What it means

The system audio lipsync store lazily resolves a platform `driver` (browser/electron-specific audio capture + lipsync backend). When start() is called and no driver was registered for the current runtime, it throws rather than silently doing nothing, so consumers can show feedback. Other system audio consumers are unaffected.

Source

Thrown at packages/stage-ui/src/stores/system-audio-lipsync.ts:100

    available.value = true
  }

  /** Removes a renderer-specific runtime if it is still the current owner. */
  function clearDriver(currentDriver: SystemAudioLipSyncDriver): void {
    if (driver !== currentDriver)
      return

    stop()
    driver = undefined
    available.value = false
  }

  /** Starts this Live2D consumer without affecting other system audio consumers. */
  async function start(): Promise<void> {
    if (isRequested.value || isStarting.value)
      return
    if (!driver)
      throw new Error('System audio lipsync is not available in this runtime')

    isStarting.value = true
    error.value = undefined
    try {
      await driver.start(currentOptions(), {
        onOutput(output) {
          inputLevel.value = output.inputLevel
          mouthOpen.value = output.mouthOpen
        },
        onEnded() {
          isActive.value = false
          isRequested.value = false
          inputLevel.value = 0
          mouthOpen.value = 0
        },
      })
      isActive.value = true
      isRequested.value = true

View on GitHub (pinned to 9c213115f8)

Solutions

  1. Check `isSupported`/driver availability from the store before calling start(), and hide or disable the lipsync toggle when unsupported.
  2. Ensure the platform driver registration module is imported/executed on the app's entry path (Electron preload wiring or browser feature module).
  3. Upgrade or run in an environment that provides the required audio capture API (e.g. Chromium-based runtime).
  4. Catch this error in the UI and surface a fallback (no lipsync) instead of crashing the enable flow.

Example fix

// before
await startLipsync()
// after
try {
  await startLipsync()
}
catch (error) {
  console.warn('Lipsync unavailable:', errorMessageFrom(error))
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!lipsyncStore.isSupported) {
  console.warn('System audio lipsync unavailable in this runtime')
  return
}

Try / catch

try {
  await lipsync.start()
}
catch (error) {
  error.value = errorMessageFrom(error)
  disableLipsyncUi()
}

Prevention

When it happens

Trigger: Calling start() (e.g. enabling lipsync for a Live2D model) in an environment where the driver was never injected — unsupported browser, Electron main-side service not wired, or the module loaded before the driver registration ran.

Common situations: Using the feature in a browser that lacks the required audio capture API; Electron preload/IPC bridge not initialized so the driver factory returned undefined; SSR or test environment without the platform implementation.

Related errors


AI-assisted analysis of moeru-ai/airi@9c213115f8 (2026-09-02). Data as JSON: /api/errors/57631c5c3e1359a7. Report an issue: GitHub.