I'm not sure if this is the right site for this question, but I was wondering how the voice activated search on Google's homepage works. Does it use Flash, some kind of plugin built into Google Chrome, or how does it use the microphone? This could be a dangerous privacy invasion if it is allowed to work the same way on any website, because no dialog asking for permission comes up, and I find this startling that Google (and who knows what other sites) can use my microphone without my permission. How is Google doing this? Javascript? Actionscript? Some custom plugin?
Asked
Active
Viewed 2.7k times
30
-
What Google Voice Search? Are you talking about http://www.google.com/mobile/google-mobile-app/ ? – Blindy Jun 17 '11 at 16:49
-
No, the PC version in their browser. – bbosak Jun 17 '11 at 16:49
-
As am I, yet I see no voice search anywhere. – Blindy Jun 17 '11 at 16:50
-
That's odd. I'm using the PC version of Chrome, the only extension I have installed is Dropbox, and I also have Flash and Silverlight installed. – bbosak Jun 17 '11 at 16:53
-
@Blindy http://youtu.be/MQnZe_Iggx0 it's new. they're probably rolling it out in phases like they do for everything else, and it probably doesn't work in all browsers – Jeff Jun 17 '11 at 20:12
-
They appear to have help pages for Android users and other mobile platforms. However they don't seem to have an API at this point for the browser based one, but as someone pointed out below you can do voice input via webkit and HTML5. – Jem Jun 17 '11 at 21:20
3 Answers
23
It's using HTML5 speech input via <input type="text" x-webkit-speech />
as the name suggests, this only works in webkit. Not sure if there are alternatives for other browsers.

Jeff
- 12,147
- 10
- 51
- 87
18
It's available to anyone. There's more information here:
http://chrome.blogspot.com/2011/04/everybodys-talking-and-translating-with.html
and an example here: http://www.web2voice.com/chrome-speech-input.html
I'm glad I'm not the only one who thinks the lack of a permissions prompt feels a little bit big-brother-esque.

Curt
- 1,394
- 9
- 16
2
A nice wrapper for the Web Speech API is available here: talater.com/annyang.
This library allows you to easily bind functions to voice commands, eg:
annyang.init({
"help": function() {$("#help").show();}
});
annyang.start();

mhu
- 17,720
- 10
- 62
- 93