speech2text

2.0.6 • Public • Published

speech2text

Speech Recognization with Native Javascript

NPM

To use, follow the below instructions:

First include library into the page, And here are some instructions to use:

 
/** Initialise the speech Recognization*/
var speech2text = new speech2text();
 
/** Add some commands if any*/
var commands = {
  play: function() {
    document.querySelector("video").play();
  },
  stop: function() {
    document.querySelector("video").pause();
  }
};
speech2text.addCommands(commands);
 
/** Start Interacting with SPEECH by allowing your microphone */
speech2text.start(function(voice) {
 
  // What you say, will be console here
  console.log(voice);
  
  // Optional: Let the robot to speak what you say 
  speech2text.onReadLoud(voice);
 
});
 

Demo

Play with speech recognition demo

Package Sidebar

Install

npm i speech2text

Weekly Downloads

1

Version

2.0.6

License

MIT

Unpacked Size

1.41 MB

Total Files

8

Last publish

Collaborators

  • rroxysam