npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

speechyl

1.0.3 • Public • Published

npm npm

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"
    },
 
]
 

install

npm i speechyl

Downloadsweekly downloads

13

version

1.0.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability