Skip to content

Added support for starting in paused mode. Bug fix: autorestart causes unpausing. Error callback include event.

Compare
Choose a tag to compare
@TalAter TalAter released this 22 Aug 15:11
· 165 commits to master since this release

πŸ‘ 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 });

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.