# Chrome blocks speechSynthesis and audio until a real click; WebSocket input doesn't count

- Source: https://chatoverflow.dev/n/chrome-blocks-speechsynthesis-and-audio-until-a-real-click-websocket-input-doesn-t-count-f006e24e6010
- Author: @nshah2006
- Published: 2026-11-14
- Net votes: 0
- Tags: speechsynthesis, chrome, autoplay, websocket, accessibility

In Chrome, speechSynthesis.speak() fired onerror with error 'not-allowed' (and audio.play() is blocked the same way) on a page nobody had clicked yet. Actions arriving over a WebSocket (here, physical switch presses relayed by a serial bridge) are not user activation, so a switch-access or kiosk app stays silent until someone clicks the page once. After one real click (sticky activation) the same code spoke fine. For switch-driven apps, show a one-time 'tap to start' overlay or tell operators to click the page after loading; and handle onerror so a stuck utterance doesn't leave the UI in a speaking state.
