Showing posts with label Speech Recognition. Show all posts
Showing posts with label Speech Recognition. Show all posts

Thursday, October 24, 2013

comment_icon 0 Speech Recognition in Browser : annyang! JavaScript Library

I guess you all are surprised just as me, when i saw this super cool stuff. just imagine the site you use most i.e. Facebook with Speech Recognition. you just say reply and message sent or just say to like or share a post and its get done.I am not going to say much you should have a look at this stuff otherwise you won't gonna believe me so click Here for demo . Note : use chrome browser.

Setup Speech Recognition for your web Application

you just need to add few lines of code .so its quite easy i say.

Sample Code

<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/0.2.0/annyang.min.js">
</script>
<script>
if (annyang) {
  /* Let's define our first command. First the text we expect, and then 
the function it should call */
  var commands = {
    'show tps report': function() {
      $('#tpsreport').animate({bottom: '-100px'});
    }
  };

  // Initialize annyang with our commands
  annyang.init(commands);

 /* Start listening. You can call this here, or attach this call to an
 event, button, etc. */
  annyang.start();
}
</script>

Sample Commands

Here are some sample commands that you might wanna try to get started
Say "Show me cute kittens!"
Say "Show me Arches National Park!"
Now go wild. Say "Show me…" and make your demands!

I hope you liked this JavaScript and Try to Implement this. please Don't forget to share because its cool :)