Google WebSpeech API is throwing 'not-allowed' error for microphone permission Google WebSpeech API is throwing 'not-allowed' error for microphone permission google-chrome google-chrome

Google WebSpeech API is throwing 'not-allowed' error for microphone permission


I couldn't find documentation backing this up, but from my own experience I can confirm that only after installing an SSL certificate on a website, chrome stopped blocking it from requesting microphone access.


I experienced not-allowed also - trying to access mic from Chrome inside cross-origin iframe. Resolved by adding allow="microphone;" to the iframe:

<iframe src="mysrc" allow="microphone;"></iframe>

Note: Also required using HTTPS for parent page & iframe page

Reference: https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes


I've encountered the same issue (throws not-allowed), but I was using HTTPS.

In my case, it turned out that you can't obtain speech or enable microphone access from an iframe. The same code works normally when not shown in an iframe.