How to make speech webkit work in Chrome extension

2019-08-26 02:30发布

问题:

A simple code like this

<html>
<body>
  <input type="text" id="txtSearch" x-webkit-speech />
</body>
</html>

works correctly in an HTML page.

I am trying to use the same code in the popup of my Google Chrome extension. But on clicking the mic icon, nothing happens in the popup.

Are there some restrictions to use code like this for popups? Or am I missing something else?

回答1:

It's being worked on, apparently, but I can't parse out from this any progress since Dec 15, 2011. http://code.google.com/p/chromium/issues/detail?id=97388



回答2:

The bug still hasn't been fixed it seems : https://code.google.com/p/chromium/issues/detail?can=2&q=102473&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary&id=102473

Furthemore, someone recommends to use the chrome speech input API : https://developer.chrome.com/extensions/experimental.speechInput.html but : 1. This API is experimental and requires Chrome to have the "experimental API" flag checked (which isn't by default). 2. I have tested it on a few OS, and it makes chrome 23 crash on Win XP, which is very annoying.