JavaScript Speech Recognition

20 Jan 2010 | By Alex Young | Tags speech APIs

Elias sent us a link to his JavaScript speech recognition API at speechapi.com. It uses Flash to record audio and sends it to a server, then the server returns suggestions to a callback. You have to register to use the API. Using the API looks like this:

<script type="text/javascript" src="http://www.speechapi.com/speechle.js"></script>
<script language="JavaScript" type="text/javascript">
var speechle;

function TheSettings() {
  var info = {'Userid':'eli', 'Logging':'true'};
  var eventCallbacks={'OnResult':'result', 'OnLogging':'logging', 'OnFinishTTS':'finishTTS'};
  var grammar={'Text':'one,two', 'Type':'simple'};
  speechle = new SPEECHLE(info,eventCallbacks,grammar);
}

The site has a few demos. One which worked pretty reliably for me was the random quiz.

A similar technology is WAMI which uses Java instead. You can try a demo in the WAMI sandbox.

Standards

There are W3C standards relating to speech recognition:

See the Voice Browser Activity for a centralised pool of related W3C resources.


blog comments powered by Disqus