Skip to content

Speech recognition fails with WebSocket 1006 error when browser extensions are active #5

Description

@A-S-Manoj

Description

Azure Speech SDK's WebSocket connection (wss://*.speech.microsoft.com)
fails with status code 1006 ("Unable to contact server") when certain
browser extensions are active — ad blockers, privacy extensions, or
VPN extensions that intercept WebSocket traffic.

Symptoms

  • Mic activates, "Listening" state shows
  • Live transcript never updates
  • No errors visible without explicit canceled event logging
  • Recognition silently fails

Root Cause

Confirmed via Incognito mode test (extensions disabled by default) —
interview flow works end to end with no code changes. This isolates
the issue to a browser extension intercepting the WebSocket handshake,
not application code.

Reproduction

  1. Use a browser with ad blocker / privacy extension enabled
  2. Start interview mode, click "I'm ready"
  3. Speak after mic activates
  4. Observe: no transcript, no error toast without canceled handler

Current Mitigation

  • Added recognizer.canceled handler to surface Azure-side errors
    via toast instead of failing silently
  • Verified working in Incognito / extension-free browser sessions

Suggested Future Fix

  • Add a one-time browser compatibility check on interview page load
  • Show a warning banner: "If the mic doesn't respond, try disabling
    browser extensions or use Incognito mode"
  • Consider fallback to backend-proxied audio upload as documented
    alternative (see architecture notes on token security trade-offs)

Environment

  • Browser: Chrome (issue), Incognito Chrome (works)
  • Azure Speech region: Central India
  • SDK: microsoft-cognitiveservices-speech-sdk

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions