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
eventYou 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.
- @remybach - For the original
-
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 calledpaused
.π» 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()
andresume()
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)