A small, dependency-free JavaScript library that lets developers add spoken voice-command control to websites by defining command patterns and associated callbacks.
Project overview
A small, dependency-free JavaScript library that lets developers add spoken voice-command control to websites by defining command patterns and associated callbacks.
Project type
AI Coding · Audio & Speech
Use cases
Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
Developers who need to add spoken voice-command control to websites using a dependency-free JavaScript library.
Key capabilities
Provides a JavaScript library through which developers define spoken command patterns and associated callbacks that control website behavior.
Supports command patterns containing a wildcard and passes the captured spoken term to the associated JavaScript callback.
Exposes a check that developers can use before defining commands and starting speech recognition.
Limitations and risks
Use is conditional on speech recognition being supported in the user's runtime environment.
Getting started
Install annyang with npm, import the library and define command callbacks, then add the commands and start listening.
Evidence and sources
README: A tiny JavaScript Speech Recognition library that lets your users control your site with voice commands.
README: **annyang** has no dependencies, weighs just 2 KB, and is free to use and modify under the MIT license.
README: ```sh npm install annyang ```
README: It's as easy as installing annyang and defining the commands you want.
README: ```js import annyang from 'annyang'; if (annyang.isSpeechRecognitionSupported()) { // Let's define a command. const commands = { 'hello': () => { alert('Hello world!'); }, 'search…