Update: Based on RobW's answer, this answer is now out of date, and the Web Speech API is now usable inside of extensions. (Unfortunately, I can't delete this answer unless the OP un-accepts it.)
The answer is not yet. Pages accessed through chrome-extension:
URLs cannot access any media-input APIs, including speechRecognition
and getUserMedia
. Any attempt to the use APIs will immediately trigger an error callback.
I originally thought speechRecognition
could work like the geolocation
API: extension popups cannot prompt for geolocation permission, but chrome-extension:
pages loaded as full browser pages can prompt for permission just like a normal page. However, media APIs do not behave this way; they fail regardless of whether the page is a popup or a full page.
There is a bug report to fix this and allow developers to specify media-access permissions in the manifest. When this bug is fixed, extensions can have a manifest-set permission that grants them automatic microphone/video access, so the inability to prompt for permission will become a non-issue (and therefore extensions with appropriate manifest permissions will be able to freely use the Speech API).