SpeechYL (spitʃ waj ɛl) is a Web Speech API library wrapper. It helps with the basic usage of web speech api. You can associate a sentence to a function with just a json object.
$ npm install speechyl
A quick tutorial available here.
Documentation available here.
Start by importing the library if you are using ES6
Or put the script file in the html file :
var speechYL = ;var lang = "en-EN";speechYL;