Giter Club home page Giter Club logo

annyang's Introduction

annyang!

A tiny JavaScript Speech Recognition library that lets your users control your site with voice commands.

annyang has no dependencies, weighs just 2 KB, and is free to use and modify under the MIT license.

Demo and Tutorial

Play with some live speech recognition demos

FAQ, Technical Documentation, and API Reference

Hello World

It's as easy as adding one javascript file to your document and defining the commands you want.

<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.1/annyang.min.js"></script>
<script>
if (annyang) {
  // Let's define a command.
  const commands = {
    'hello': () => { alert('Hello world!'); }
  };

  // Add our commands to annyang
  annyang.addCommands(commands);

  // Start listening.
  annyang.start();
}
</script>

Check out some live speech recognition demos and advanced samples, then read the full API Docs.

Adding a GUI

You can easily add a GUI for the user to interact with Speech Recognition using Speech KITT.

Speech KITT makes it easy to add a graphical interface for the user to start or stop Speech Recognition and see its current status. KITT also provides clear visual hints to the user on how to interact with your site using their voice, providing instructions and sample commands.

Speech KITT is fully customizable and comes with many different themes, and instructions on how to create your own designs.

Speech Recognition GUI with Speech KITT

<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.1/annyang.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/SpeechKITT/0.3.0/speechkitt.min.js"></script>
<script>
if (annyang) {
  // Add our commands to annyang
  annyang.addCommands({
    'hello': function() { alert('Hello world!'); }
  });

  // Tell KITT to use annyang
  SpeechKITT.annyang();

  // Define a stylesheet for KITT to use
  SpeechKITT.setStylesheet('//cdnjs.cloudflare.com/ajax/libs/SpeechKITT/0.3.0/themes/flat.css');

  // Render KITT's interface
  SpeechKITT.vroom();
}
</script>

For help with setting up a GUI with KITT, check out the Speech KITT page.

Author

Tal Ater: @TalAter

License

Licensed under MIT.

annyang's People

Contributors

acdpnk avatar crosskpixel avatar endi1 avatar evaldosantos avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hannesoberreiter avatar jacobwgillespie avatar james1x0 avatar jaredly avatar keanw avatar kkirsche avatar limury avatar mattcain avatar mdboop avatar mikepsinn avatar pavelvanecek avatar poziworld avatar rocketbear27 avatar samu101108 avatar siawyoung avatar soney avatar talater avatar thebinitghimire avatar theotow avatar tifa64 avatar timotius02 avatar v12 avatar vikas-bansal avatar zahratee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

annyang's Issues

Add support for debug mode

annyang.debug() or annyang.debug(true) should turn on debug mode which will output more data to console. including recognized text, and more.

Improve docs

  • Pages hosted on HTTPS do not need to ask repeatedly for permission, whereas HTTP hosted pages do.

Plugin: Password input

Plugin for entering passwords.

Enter easy-to-remember, super-long, super-strong passwords quick and easy by saying them instead of typing them... e.g. "I ran out of oysters so I ran to the bank"

Crash when two tab use annyang

Hi,

When I open two tab or more with annyang the last tab works but the other crach are they anyway to avoid these (like do not load annayang if annayang is used by another tab) ?

Add option to highlight permission request

Show visual cue to user that he needs to approve use of mic.
Perhaps an overlay on the page that draws attention to the notice. This can have an optional text message.
Consider building as an optional external component, plugin.

Can receive a routing object

For example

annyang.addNavigation({
  'apple tv': 'http://store.apple.com/us/ipod/ipod-accessories/apple-tv',
  'ipod nano': 'http://store.apple.com/us/buy-ipod/ipod-nano',
  'monitors': 'http://store.apple.com/us/mac/mac-accessories/displays'
});

Should also be able to get multiple phrases for one url.

Not compatible with android browser

I have tried to get it working and have had no luck. Any plans to make this possible in the future. I have a project that would really benefit from this!

Add link to the GitHub repo

@TalAter I consider that it might be useful to add a link to this GitHub repo on the site. "Let's get started!" doesn't work for a good portion of the people visiting your website, portion from which a few would also be interested in the implementation/issues regarding the library.

Improve flickr demo

  • Maybe a powered by flickr box.
  • Change number of results shown
  • Add spinning loader while loading
  • Show what is being searched

Allow OR in rules

e.g.

  var commands = {
    'show||display tps report': function() { $('#tpsreport').show(); }
  };

is it possible to use this with node-webkit?

I'm just learning node-webkit and also just found this library today. It works great in the chrome browser, and I am able to get a audio stream in my hello world node-webkit application via the webkitGetUserMedia plugin. But annyang doesn't seem to be working. No errors, just not doing anything.

By the way, just testing with a simple command:

 var commands = {
        'go away': function() {
          window.close();
        }
      };

      annyang.init(commands);
      annyang.start();

Add multi language support

annyang already supports receiving commands in any language.
Just call:

// choose language
annyang.setLanguage('it-IT');

// define commands in that language
annyang.init({
  'mi chiamo *name': sayHello
});

Need to add support for defining rules in multiple languages, and then a user should be able to just change the language without redefining rules:

// choose language
annyang.setLanguage('it-IT');

// define commands in that language
annyang.init(
  'it-IT': {
    'mi chiamo *name': sayHello
  },
  'en' : {
    'my name is *name': sayHello
  }
});

annyang.setLanguage('en');
// now annyag recognizes English
annyang.setLanguage('it-IT');
// now annyag recognizes Italian

See how this can be added without breaking existing code (can define either multiple languages, or one)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.