1) The speech recognition bit is already available in Chrome.
2) The specification is "sane". I guess it helps when only a couple of people are credited as authors instead of a committee.
One of the things that has been bugging me for awhile is the inability to develop these type of apps on the desktop using the same API. Yes, as I said above the speech rec bit is available in Chrome but the objects have the "webkit" prefix and there is not TTS support. So during one of the Ottawa Ruby project nights I set out to write a shim that would give everyone the ability to use the same API that will be available from the PhoneGap plugins on their desktop.
Basically that is what SpeechShim is in a nutshell. When you add speechshim.js into your web app you will be able to access the "SpeechRecogntion" object instead of needing to prefix it like "webkitSpeechRecognition". As well if you combine it with the speak.js project the speechshim.js code will add the methods necessary so you can use the SpeechSynthesis interface.
To get up and running you will need:
- A copy of Google Chrome version 29 or higher.
- A copy of the speak.js project from github.
- A copy of my speechshim.js from github.
Here's an example HTML page:
and you can run the live demo here. It's nothing fancy. Just click the big button then say something. It should get updated under the button and you will hear it spoken out by the TTS. More on plugin availability for PhoneGap is coming soon.