All Versions
10
Latest Version
Avg Release Cycle
127 days
Latest Release
1257 days ago

Changelog History

  • v2.6.1 Changes

    May 07, 2018

    πŸš€ πŸ‘ This release is 100% backwards compatible with all v2 releases.

    πŸ‘ Ensured support up to Node.js 10.
    ⚑️ Updated dependencies and rebuilt for a more efficient distributable.

    🍱 Awesome people ⭐️

    Special thanks to:

  • v2.6.0 Changes

    October 07, 2016

    πŸš€ πŸ‘ This release is 100% backwards compatible with all v2 releases.

    [Added] Allow listening to the soundstart event

    You can now add a callback event which will run when the speech recognition's soundstart event fires.

    annyang.addCallback('soundstart', fn);
    

    0️⃣ This event will fire once per speech recognition session (due to a bug in Chrome). If you would like to get it again the next time sound is heard, you can abort and restart speech recognition… which is the default behavior in HTTPS anyway. In other words, in HTTPS it works great.

    πŸ‘€ See a more complete example for detecting when the user starts and stops speaking in the FAQ.

    πŸ”„ Changed file structure and development stack

    The main annyang files which you will include in your project are now in the /dist directory:

    If you would like to work on annyang's code itself, it is now in the /src directory:

    annyang's source now passes through babel with the es2015 preset, so you can use ES2015 language features in it.

    🍱 Awesome people ⭐️

    Special thanks to:

    • @remybach - For the original soundstart event code, and helping determine the final functionality.
    • βœ… @peterdillon - Helping create a use case to test the new soundstart event.
  • v2.5.0 Changes

    August 22, 2016

    πŸš€ πŸ‘ This release is 100% backwards compatible with all v2 releases.

    [Added] Allow starting annyang in paused mode

    The options object passed to annyang.start() now accepts a new attribute called paused.

    πŸ’» The following example will start the browser's speech recognition engine, but annyang will be in paused mode (meaning that it will not respond to any speech, even if it matches commands).

    annyang.start({ paused: true });
    

    0️⃣ paused is optional and defaults to false if you do not set it.

    πŸ›  [Fixed] An autorestart will cause annyang to unpause

    πŸ›  As reported in #193, if annyang is paused and set to autorestart, it would be unpaused when the Speech Recognition engine restarts. This has been fixed to maintain the paused state.

    [Added] Error callbacks can now access error event

    All callbacks added on error events (error, errorNetwork, errorPermissionBlocked, and errorPermissionDenied) are now called with the error event as their first argument.

    Sample usage:

    annyang.addCallback('error', function(event) { console.log(event.error); });
    

    🍱 Awesome people ⭐️

    A lot of people have helped make this version possible!

    Special thanks to:

    • πŸ— @v12 - Speeding up the Travis build (571fad2)
    • πŸ“„ @evancohen - Helping the community with running annyang in Chromium, Electron and Cordova and helping improve annyang's docs (8e5e0c3).
    • ♻️ @vikas-bansal - Refactoring the debug code (7af107e)
    • @shekit - Spotting the pausing bug (#193).
    • @lmangani - 🌟 Helping the community with so many things.
    • @kelvien - Helping the community with speech recognition in Chromium.
    • @daniel3d - Helping the community with speech recognition in Chromium and Electron.
    • @thurt - Helping with code contributions (#211)
    • @atchyut-re - Helping the community with open issues.
    • @Digitaledgestudios - Helping the community with open issues.
    • @mcollovati - Helping the community with very detailed responses (#216).
    • @daniel3d - Helping with adding error event to the error callbacks.
  • v2.4.0 Changes

    April 11, 2016

    [Added] annyang.trigger() method

    annyang commands can now be triggered manually by emulating speech being said. Pass a sentence, or an array of possible sentences to annyang.trigger(), and annyang will act on them as if they came from speech recognition.

    Examples:

    annyang.trigger('Time for some thrilling heroics');annyang.trigger( ['Time for some thrilling heroics', 'Time for some thrilling aerobics'] );
    
  • v2.3.0 Changes

    March 31, 2016

    πŸ‘ [Added] UMD support

    πŸ‘ annyang can now be required as a module in environments that support them.

    πŸ‘ Here is an example of using annyang in an Electron app (an environment that supports both modules and Speech Recognition):

    \<script\>const annyang = require('./annyang.min.js');annyang.addCommands({'hello': function() {console.log('world'); } });annyang.start();\</script\>
    

    πŸ‘ This additional support for modules does not break existing functionality, as annyang is still available in the global scope.

    A huge thanks goes to @v12 for all the hard work to make this feature possible!

    πŸ›  [Fixed] Fixed tiny init bug

    πŸ› Bug caused an exception to be thrown when attempting to abort annyang before it was initialized.

    βœ… [Added] New tests added

    πŸ‘Œ Improved test coverage of annyang

    🍱 Awesome people ⭐️

    A lot of contributors have helped make this version possible!

    Special thanks to:

    • πŸ‘ @v12 - Added UMD support.
    • @lmangani - Thank you for repeatedly being the first one to step up and help the community with issues.
    • @wizardsambolton - Thank you for helping the community with issues.
    • @rmilesson - Thank you for helping the community with issues.
    • @evancohen - Thank you for helping the community with issues.
    • @sdkcarlos - Thank you for helping the community with issues.
    • @asantos00 - Thank you for helping the community with issues.
    • βœ… @chrifpa - Added tests.
    • βœ… @MattCain - Added tests.
    • βœ… @Byron - Added tests.
    • βœ… @timotius02 - Added tests.
    • βœ… @ZahraTee - Added tests.
  • v2.2.1 Changes

    January 27, 2016

    🚚 [Added] - annyang.removeCallback()

    πŸ†• New method allows removing callbacks you attached to events.
    πŸ“š Check out the annyang.removeCallback() documentation for details and sample code.

    Announcing Speech KITT

    Meet Speech KITT - a new library that makes it as easy as possible to create a GUI for users to interact with Speech Recognition

    [Fix] Bug

    πŸ›  Fixed a bug which caused an error to be thrown when a command that was called by annyang included calls to to remove commands.

    βœ… Test Coverage Improved

    πŸ‘Œ Improved test coverage of annyang using the new Speech Recognition mock object - Corti.

    🍱 Awesome people ⭐️

    A lot of new contributors have helped make this version possible!
    Special thanks to:
    πŸ›  @soney - Found and fixed a bug when removing commands from command
    πŸ“š @qgustavor - Documentation
    βœ… @siawyoung - Added new tests and helped new contributors
    βœ… @Endi1 - Added new tests
    βœ… @evaldosantos - Added new tests
    βœ… @theotow - Added new tests
    βœ… @mdboop - Added new tests
    🚚 @wizardsambolton + @MartinKoutny - Idea for removeCallback() method

  • v2.2.0

    January 27, 2016
  • v2.1.0 Changes

    December 24, 2015

    βž• Added a new method which returns true if speech recognition is currently on. Returns false if speech recognition is off or annyang is paused.

    if (annyang) { annyang.isListening(); // will return falseannyang.start(); annyang.isListening(); // will return trueannyang.pause(); annyang.isListening(); // will return falseannyang.abort(); annyang.isListening(); // will return false}
    
  • v2.0.0 Changes

    July 24, 2015

    βž• Added

    You can now pass an object containing a RegExp and a callback function to the addCommands() or init() methods. This allows for much more powerful command matching

    Example:
    var calculateFunction = function(month) { console.log(month); }var commands = { // This example will accept any word as the "month"'calculate :month stats': calculateFunction, // This example will only accept months which are at the start of a quarter'calculate :quarter stats': {'regexp': /^calculate (January|April|July|October) stats$/, 'callback': calculateFunction} }
    

    πŸ‘€ See https://github.com/TalAter/annyang/tree/master/docs#commands-object for details.

    πŸ”„ Changed

    Some callbacks registered on events will now be fired with parameters.

    Example:
    annyang.addCallback('resultNoMatch', function(phrases) { console.log('No command matched. Possible sentences said:'); console.log(phrases); });annyang.addCallback('result', function(phrases) { console.log('Speech recognized. Possible sentences said:'); console.log(phrases); });annyang.addCallback('resultMatch', function(said, commandMatched, phrases) { console.log('Command matched'); console.log('The phrase the user said that matched a command'); console.log(said); console.log('The command that was matched'); console.log(commandMatched); console.log('An array of possible alternative phrases the user might\'ve said'); console.log(phrases); });
    

    πŸ‘€ See https://github.com/TalAter/annyang/blob/master/docs/#addcallbacktype-callback-context for details.

    πŸ”„ Changed

    πŸ”Š In debug mode, adding commands no longer logs a message with the number of commands loaded. Instead it logs individual messages for each command registered along with it's name.
    If one of the commands could not be loaded because it wasn't properly formatted, an error message with the name of the command will be logged.

    πŸ›  Fixed / Added

    πŸ“š Documentation expanded and improved.
    Greatly expanded README section on callbacks.
    ⚑️ Updated README with all changes made in this version.

  • v1.6.0 Changes

    March 19, 2015

    βž• Added two new methods which allow you to pause() and resume() annyang.

    πŸ’» These will just cause annyang to stop responding to speech commands, without actually stopping or restarting the browser's SpeechRecognition engine - which is great because you can now instantly pause-resume-pause-resume at any moment without requesting permissions again (even on HTTP).

    This contribution comes from @niki4810 who also provided an interesting scenario for when and how to use this in #98

    πŸš€ This release also catches exceptions thrown by the SpeechRecognition engine, if you try to start it when it is already started. The error message is logged to the console (if debug mode is on)