{"record":{"id":"d0fb506e9c80eb59","repo":"moeru-ai/airi","slug":"web-speech-api-microphone-access-issue-please-ch","errorCode":null,"errorMessage":"Web Speech API: Microphone access issue. Please check microphone permissions.","messagePattern":"Web Speech API: Microphone access issue\\. Please check microphone permissions\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/stage-ui/src/libs/providers/providers/browser-web-speech-api/provider.ts","lineNumber":273,"sourceCode":"      console.info('Web Speech API transcribed (final):', trimmedTranscript)\n    }\n\n    // Log interim results for debugging (don't emit as final)\n    if (interimTranscript && recognition.interimResults) {\n      console.info('Web Speech API transcribed (interim):', interimTranscript)\n    }\n  }\n\n  recognition.onerror = (event: any) => {\n    const errorType = event.error || 'unknown'\n    console.warn('Web Speech API error:', errorType)\n\n    if (errorType === 'no-speech') {\n      return\n    }\n\n    if (errorType === 'audio-capture') {\n      console.warn('Web Speech API: Microphone access issue. Please check microphone permissions.')\n      return\n    }\n\n    if (errorType === 'network' || errorType === 'aborted') {\n      return\n    }\n    const error = new Error(`Speech recognition error: ${errorType}`)\n    fullStreamCtrl?.error(error)\n    textStreamCtrl?.error(error)\n    deferredText.reject(error)\n    deferredText.isRejected = true\n    options?.onSpeechEnd?.(fullText)\n  }\n\n  recognition.onend = () => {\n    console.info('Web Speech API recognition ended. Continuous mode:', options?.continuous !== false, 'Aborted:', options?.abortSignal?.aborted)\n\n    // If continuous mode and not aborted, restart recognition","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/stage-ui/src/libs/providers/providers/browser-web-speech-api/provider.ts#L255-L291","documentation":"A specific Web Speech API error branch: recognition.onerror received 'audio-capture', meaning the browser could not capture audio from the microphone device. This is logged as a warning with guidance to check microphone permissions/hardware and the handler returns without failing the stream.","triggerScenarios":"SpeechRecognition.start() runs with no microphone available/selected, the OS mic is muted/disabled, the browser's microphone device disappeared mid-session (unplugged headset, device switch), or another application holds exclusive access to the capture device.","commonSituations":"Headset disconnected after permission was granted; default input device changed while recognition was active; OS-level privacy switch (Windows mic toggle, macOS mic permission for the browser) turned off; remote desktop/VM without an audio input device.","solutions":["Physically verify a microphone is connected and selected as the system default input.","Re-enable OS microphone access for the browser (Windows privacy settings / macOS Privacy & Security → Microphone).","Close other apps holding the microphone exclusively, then restart recognition.","If on a VM/remote session, attach an audio input device or use a server-side transcription provider instead."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"async function hasLiveMicrophone(): Promise<boolean> {\n  try {\n    const stream = await navigator.mediaDevices.getUserMedia({ audio: true })\n    stream.getTracks().forEach(t => t.stop())\n    return true\n  }\n  catch {\n    return false\n  }\n}\n// run before starting continuous recognition","typeGuard":null,"tryCatchPattern":"recognition.onerror = (event) => {\n  if (event.error === 'audio-capture') {\n    // stop recognition, show 'check microphone' guidance, allow retry\n    return\n  }\n}","preventionTips":["Request and verify getUserMedia access before starting recognition.","Watch devicechange events and restart recognition when the input device changes.","Confirm OS-level mic permissions/enabled state in app onboarding."],"tags":["web-speech-api","microphone","audio-capture","hardware"],"backgroundTag":"microphone-capture-failure","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}