{"record":{"id":"348d9eb884338fa3","repo":"moeru-ai/airi","slug":"3-browser-requires-user-gesture-ensure-micropho-348d9e","errorCode":null,"errorMessage":"3. Browser requires user gesture - ensure microphone was enabled by user action","messagePattern":"3\\. Browser requires user gesture - ensure microphone was enabled by user action","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/provider-inference/src/providers/local/browser-web-speech-api/provider.ts","lineNumber":460,"sourceCode":"    console.info('Web Speech API sound ended')\n  }\n\n  recognition.onaudioend = () => {\n    console.info('Web Speech API audio capture ended')\n  }\n\n  recognition.onnomatch = () => {\n    console.info('Web Speech API: No speech match')\n  }\n\n  const started = startRecognition()\n  if (!started) {\n    // If immediate start failed, it might be a permission issue\n    // Web Speech API will prompt for permission automatically, so we just log\n    console.warn('Web Speech API recognition did not start immediately. This might be due to:')\n    console.warn('1. Microphone permission not granted - browser should prompt automatically')\n    console.warn('2. Recognition already running - this is normal if called multiple times')\n    console.warn('3. Browser requires user gesture - ensure microphone was enabled by user action')\n\n    // Don't retry immediately - wait for permission or user action\n    // The recognition instance is already created, so it can be started later if needed\n  }\n\n  return {\n    fullStream,\n    text: deferredText.promise,\n    textStream,\n    recognition: recognitionInstance,\n  }\n}\n","sourceCodeStart":442,"sourceCodeEnd":473,"githubUrl":"https://github.com/moeru-ai/airi/blob/f679616c34f1cf6d282c8d64264242af944b3fed/packages/provider-inference/src/providers/local/browser-web-speech-api/provider.ts#L442-L473","documentation":"In streamWebSpeechAPITranscription, startRecognition() returned false, meaning the Web Speech API recognition object could not start immediately. The code does not throw; it logs diagnostic warnings listing likely causes — ungranted microphone permission, unsupported browser, and (this message) recognition.start() not being triggered from a user gesture. It signals degraded/failed transcription startup rather than a runtime exception.","triggerScenarios":"Thrown at packages/provider-inference/src/providers/local/browser-web-speech-api/provider.ts:460 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Trigger recognition.start() from a direct user gesture such as a microphone button click","Confirm the browser supports SpeechRecognition and the page is on HTTPS or localhost","Check microphone permission state via navigator.permissions and prompt for it from user action"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f679616c34f1cf6d282c8d64264242af944b3fed","analyzedAt":"2026-09-08T13:18:15.005Z","contentChangedAt":"2026-09-08T13:18:15.005Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}