Skip to content

Instantly share code, notes, and snippets.

@raymondjavaxx
Forked from henrikh/gist:883753
Created March 24, 2011 06:54
Show Gist options
  • Save raymondjavaxx/884680 to your computer and use it in GitHub Desktop.
Save raymondjavaxx/884680 to your computer and use it in GitHub Desktop.

Using the latest Chrome Beta (11.0.696.16 beta) and the new HTML5 Speech Input features, we can jump into the future with Wolfram|Alpha.

Make a bookmark with the code below as the source.

javascript:(function(){javascript:input=$('input');
['','webkit','x-webkit-'].map(function(prefix){input.attr(prefix+'speech','').bind(prefix+'speechchange',
function(e){$('form:first').submit()})})})();

Navigate to Wolfram|Alpha, click the bookmark. Using the microphone button, try some queries:

  • Integrate x squared
  • President of the United States of America
  • Compare Sweden and Germany
  • What is the time

and so on...

Also some Ell Grey made a Voice Search Chrome Extension!

Learn more about the spec!

var input = $('input');
['',
'webkit',
'x-webkit-']
// Yeah, I know, non-legit attributes and events are bound, but I hate repeating stuff
.map(
function(prefix){
input
.attr(prefix + 'speech', '')
.bind(prefix + 'speechchange', function(e){
$('form:first').submit()
}
)
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment