0.0.2 • Published 7 years ago

speechrecognizer v0.0.2

Weekly downloads
5
License
Apache 2.0
Repository
github
Last release
7 years ago

cordova-plugin-speech-recognizer

Cordova plugin which will provide a speech recognition service for PhoneGap applications

Installation

cordova plugin add https://github.com/manueldeveloper/cordova-plugin-speech-recognizer.git cordova plugin add com.manueldeveloper.speech-recognizer

Use

You can access to this plugin through navigator.speechrecognizer and then, you can call to the recognize method which has the following parameters:

  • successCallback: Callback which will be called when the recognition service ends providing the results as JSONArray
  • failCallback: Callback which will be called when the recognition service detects a problem with its code error as (String)
  • maxResults: Integer with the maximum number of results to provide
  • promptMessage: String with a minimum title to show through the user interface

Supported Platforms

  • Android
  • iOS (in developing process)

Example

navigator.speechrecognizer.recognize(successCallback, failCallback, 5, "Cordova Speech Recognizer Plugin");

function successCallback(results){
	console.log("Results: " + results);
}

function failCallback(error){
	console.log("Error: " + error);
}