moeru-ai/airi · warning
Web Speech API: Microphone access issue. Please check microp
Error message
Web Speech API: Microphone access issue. Please check microphone permissions.
What it means
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.
Source
Thrown at packages/stage-ui/src/libs/providers/providers/browser-web-speech-api/provider.ts:273
console.info('Web Speech API transcribed (final):', trimmedTranscript)
}
// Log interim results for debugging (don't emit as final)
if (interimTranscript && recognition.interimResults) {
console.info('Web Speech API transcribed (interim):', interimTranscript)
}
}
recognition.onerror = (event: any) => {
const errorType = event.error || 'unknown'
console.warn('Web Speech API error:', errorType)
if (errorType === 'no-speech') {
return
}
if (errorType === 'audio-capture') {
console.warn('Web Speech API: Microphone access issue. Please check microphone permissions.')
return
}
if (errorType === 'network' || errorType === 'aborted') {
return
}
const error = new Error(`Speech recognition error: ${errorType}`)
fullStreamCtrl?.error(error)
textStreamCtrl?.error(error)
deferredText.reject(error)
deferredText.isRejected = true
options?.onSpeechEnd?.(fullText)
}
recognition.onend = () => {
console.info('Web Speech API recognition ended. Continuous mode:', options?.continuous !== false, 'Aborted:', options?.abortSignal?.aborted)
// If continuous mode and not aborted, restart recognitionView on GitHub (pinned to 677329427f)
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.
Defensive patterns
Strategy: validation
Validate before calling
async function hasLiveMicrophone(): Promise<boolean> {
try {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true })
stream.getTracks().forEach(t => t.stop())
return true
}
catch {
return false
}
}
// run before starting continuous recognition Try / catch
recognition.onerror = (event) => {
if (event.error === 'audio-capture') {
// stop recognition, show 'check microphone' guidance, allow retry
return
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Web Speech API error:
- Web Speech API recognition did not start immediately. This m
- 1. Microphone permission not granted - browser should prompt
- 2. Recognition already running - this is normal if called mu
- Web Speech API is not available in this environment. It requ
AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18).
Data as JSON: /api/errors/d0fb506e9c80eb59.
Report an issue: GitHub.