SpeechYL
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.
Installation
From npm
$ npm install speechyl
Quick tutorial
A quick tutorial available here.
Documentation
Documentation available here.
Usage
Getting started
Start by importing the library if you are using ES6
import SpeechYL from 'speechyl'
Or put the script file in the html file :
<script src="speechYL.min.js"></script>
var speechYL = new SpeechYL();
var lang = "en-EN";
speechYL.setLang(lang);
Simple example commands file
[
{
"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"
},
]