Voice Speech Recognition
Simple wrapper extended functionalities of Speech Recognition embedded in browsers.
Installation
$ npm install voice-speech-recognition
Quick start
var VSR = require; var recognizer = });
Configuration
var config = ; var recognizer = VSR.voiceSpeechRecognition;
- continuous - results are returned for each recognition, or only a single result
- interimResults - interim results will be returned
- maxAlternatives - maximum number of alternatives
- lang - sets the language of speech recognition
- grammars - represent the grammars for current speech recognition
- serviceURI - specifies the location of the speech recognition service
Getters
- isRecognizing - does recognizing is in progress,
- finalRecognizing - final recognized speech,
- interimRecognizing - processed speech till this time,
- lastRecognizing - last processed part of speech
var text = recognizer.finalRecognizing;
Controls
- startRecognition() - start recognizing of audio stream, speech etc.,
- stopRecognition() - stop working,
- abortRecognition() - force stop working without last result handling,
- resetRecognition() - reset all text ouputs for recognized speech
Events
You can add event listeners for these events:
- onstart
- onresult
- onerror
- onnomatch
- onend
- onaudiostart
- onaudioend
- onsoundstart
- onsoundend
- onspeechstart
- onspeechend
Licence
MIT