HTML 5 Web Speech API || Speech recognition Using HTML pages
The new HTML 5 Web Speech API gives speech recognition power to your
html web pages. This specification defines a JavaScript API by using
this api developers can add speech recognition in to HTML pages. Eg: we
can make Spoken password inputs.
This is not a W3C Standard and this specification was given by Speech API Community Group
This speech recognition capabilities now found only in Chrome browser
(version 25 or above).
Speech API
How to Check
browser supports the Web Speech API or Not ?
- by checking if the webkitSpeechRecognition
object exists or not. check the code given below.
if (!('webkitSpeechRecognition' in window)) {
upgrade();
} else {
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function() { ... }
recognition.onresult = function(event) { ... }
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
More About Speech API by W3C Community click HerePeanutgalleryfilms Provides a demonstration.
0 comments:
Post a Comment