moeru-ai/airi · warning

No audio input device selected

Error message

No audio input device selected

What it means

Hearing settings playground guard: setupAudioMonitoring() bails out with this warn (returning false) when selectedAudioInput is empty, before startStream() is attempted. The device list can be empty because enumerateDevices has not run yet, device labels/IDs are hidden until microphone permission is granted, the user chose nothing, or the machine has no input device.

Solutions

  1. Ensure askPermission() completed so navigator.mediaDevices.enumerateDevices() returns real device IDs
  2. Pick a device in the Audio Input Device combobox, or auto-select the first audioinput once the list loads
  3. Confirm the OS exposes a microphone to the browser (system privacy settings)
  4. After unplugging a device, re-select a valid one - the empty selection will keep skipping setup

Example fix

// before
if (!selectedAudioInput.value) {
  console.warn('No audio input device selected')
  return false
}

// after - auto-pick the first available input
if (!selectedAudioInput.value) {
  const devices = await navigator.mediaDevices.enumerateDevices()
  const first = devices.find(d => d.kind === 'audioinput')
  if (!first)
    return false
  selectedAudioInput.value = first.deviceId
}
Defensive patterns

Strategy: validation

Validate before calling

if (!selectedAudioInput.value) {
  const devices = await navigator.mediaDevices.enumerateDevices()
  const first = devices.find(d => d.kind === 'audioinput')
  if (!first)
    return false
  selectedAudioInput.value = first.deviceId
}
return await setupAudioMonitoring()

Prevention

When it happens

Trigger: Opening the hearing settings module before the onMounted askPermission() resolves and devices are enumerated; permission never granted so enumerateDevices returns label-less entries; no microphone hardware; selectedAudioInput cleared after the chosen device disconnects.

Common situations: First visit racing the permission flow; revoked microphone permission; headless/VM environments without audio input; device unplugged between sessions leaving a stale empty selection.

Related errors


AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18). Data as JSON: /api/errors/eed91d4d0c7410cb. Report an issue: GitHub.

Appendix: source

Thrown at packages/stage-pages/src/pages/settings/modules/hearing.vue:146

    const message = errorMessageFrom(cause) ?? t('settings.pages.modules.hearing.sections.section.playground.transcription-failed')
    finishError(metadata, message)
    error.value = message
  },
})

const isSpeechVolume = shallowRef(false) // Volume-based speaking detection
const isSpeech = computed(() => {
  if (useVADModel.value && loadedVAD.value) {
    return isSpeechVAD.value
  }

  return isSpeechVolume.value
})

async function setupAudioMonitoring() {
  try {
    if (!selectedAudioInput.value) {
      console.warn('No audio input device selected')
      return false
    }

    await stopAudioMonitoring()

    await startStream()
    if (!stream.value) {
      console.warn('No audio stream available')
      return false
    }

    if (supportsStreamInput.value) {
      // The Hearing pipeline owns speech segmentation and the provider session.
      // The page VAD below only drives the visualization for streaming providers.
      await transcribeForMediaStream(stream.value, {
        consumerId: hearingPlaygroundTranscriptionConsumerId,
        onSpeechEnd: finishStreaming,
        onTranscriptionUpdate: replaceStreamingText,

View on GitHub (pinned to 677329427f)