22

I want to try creating a jQuery slideshow using simple voice commands like "next" or "previous". Is there a way to use Google's voice recognition? I know about Chrome's x-webkit-speech, but I have to click a button to use it.

I tried MIT's WAMI, but I found it slower and less accurate than Google's speech cognition.

Leo Jiang
  • 24,497
  • 49
  • 154
  • 284
  • possible duplicate of [How Google Voice Search works? Is there an API for that?](http://stackoverflow.com/questions/6389039/how-google-voice-search-works-is-there-an-api-for-that) – Mateen Ulhaq Jan 19 '12 at 06:49

4 Answers4

21

As of today this now exists, for Chrome: http://chrome.blogspot.co.uk/2013/01/hello-browser.html

(api doc)

Tim Perry
  • 11,766
  • 1
  • 57
  • 85
  • 11
    I've created a JavaScript library that wraps this and makes it super-easy to add voice commands to your site or app. Check it out at https://www.talater.com/annyang/ – Tal Ater Sep 07 '13 at 23:28
13

For an easy way to do this with JavaScript, check out annyang, which is a library that makes dealing with speech recognition super-easy.

Tal Ater
  • 1,121
  • 1
  • 10
  • 17
2

The issue is what will capture your user's speech and send it some speech server for processing. x-webkit-speech is built into the browser and the browser uses the PC's sound card to capture speech. Javascript/Jquery in a browser alone cannot access the hardware devices. I do not know if Chrome exposes any x-webkit-speech objects in the DOM so you can do capture through Javascript.

That said, people have reverse engineered the Google speech api and used it from code. See http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/ for an example.

Michael Levy
  • 13,097
  • 15
  • 66
  • 100
1

I found this, I have not personally used it do I don't know if it is entirely what you are looking for but take a look.

http://captico.com/introducing-speech-2-text-api-by-google/2011/03

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Roger
  • 145
  • 14
  • Nice interface with that uses this technology is https://www.textfromtospeech.com/uk/voice-to-text/ – Paul R Jan 27 '17 at 22:17