7

I am working on chrome browser. The code <input x-webkit-speech> will show this:
bar1
if you click the mic icon, you can input speech. like this
bar2


My question is how to make it record voice to recognize automatically, without manually click the mic icon?
Such as when the page loaded, it start to record; or write codes to emulate a click event? Is it possible?
May you give a sample code or x-webkit-speech API's document?
Thank you.

zhu
  • 374
  • 1
  • 3
  • 10

1 Answers1

9

This should not be possible, because if it were it would be a privacy hazard — a page could start recording what is said in the vicinity without the user being aware of it or intending to. If there is any way to accomplish this, it will most certainly be removed as soon as the browser developers become aware of the problem.

Kevin Reid
  • 37,492
  • 13
  • 80
  • 108
  • enn, I am writing a company internal use tool, to auto test another product. So I'd like to avoid any manual click operations. Any suggestion? – zhu Mar 23 '12 at 02:13
  • 3
    The web browser can't tell whether you have good intentions. Now, it is *possible* that there are other means, such as for example a browser extension/plugin so that your code is given additional privileges, but you will certainly not be able to do this *from an ordinary web page*. – Kevin Reid Mar 23 '12 at 02:15
  • 1
    but at least it should be possible with a checkbox for the user via 'listen again if submitted' or similar – Karussell Oct 24 '12 at 12:55