Web Speech API library wrapper
npm install speechylSpeechYL (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.
``bash`
$ npm install speechyl
A quick tutorial available here.
Documentation available here.
Start by importing the library if you are using ES6
`javascript`
import SpeechYL from 'speechyl'`
Or put the script file in the html file :html`
`javascript`
var speechYL = new SpeechYL();
var lang = "en-EN";
speechYL.setLang(lang);
`json
[
{
"recognition": "Hello",
"synthesis": "Hello World"
},
{
"recognition": {
"en-EN": "log me out",
"fr-FR": "deconnecte moi"
},
"func": "logOut"
},
{
"recognition": {
"en-EN": "go to the previous page",
"fr-FR": "va a la page precedente"
},
"func": "goPreviousPage"
},
{
"recognition": {
"en-EN": "go to the next page",
"fr-FR": "va a la page suivante"
},
"func": "goNextPage"
},
]
``