Skip to content

annyang v3.1.0

Choose a tag to compare

@TalAter TalAter released this 06 Oct 23:02
· 8 commits to master since this release

More forgiving voice commands

Speech recognition sometimes adds punctuation to what you say. annyang now handles common sentence punctuation automatically, with no new options to configure.

annyang.addCommands({
  'hello there': () => { console.log('Hello!'); },
});

// All three match the same command:
annyang.trigger('hello there');
annyang.trigger('Hello there!');
annyang.trigger('Hello, there.');

Commands written with punctuation, like 'Hello, there!', work too.

New Features

  • More forgiving punctuation matching — String commands tolerate sentence-ending periods, exclamation marks, and question marks after literal text, and commas between literal words. Captured values and custom regular expressions are unchanged.

Bug Fixes

  • Unicode case-insensitive matching — String commands now correctly match uppercase and lowercase letters outside the basic multilingual plane, including Deseret and Osage.

Internal

  • Updated development dependencies to address security advisories.
  • Kept the patched humanfs dependency compatible with Node.js versions below 24.