Skip to content

Added annyang.trigger() method

Compare
Choose a tag to compare
@TalAter TalAter released this 11 Apr 07:53
· 233 commits to master since this release

[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']
  );