A simple plugin that recongizie your speech using native ios API.
P.S. This plugin only support cantonese on IOS devices only.
Welcome for any suggestion on this plugin.
For test the plugin:
iosSpeechRecognizer.greet("Hello World",function(msg){console.log(msg);});
For init the plugin
iosSpeechRecognizer.initTheSpeechRecognizer();
Start the recongition by this API
iosSpeechRecognizer.startDictation();
Get the Result and stop the recongition by this API
iosSpeechRecognizer.stopDictation(function(msg){
console.log(msg); // msg is the result
});
UPDATE: This method will return recongizied string after user speak more than 4 words.
iosSpeechRecognizer.startDictationWithCallBack(function(msg){
console.log(msg); // msg is the result
});
Install the plugin
cordova plugin add https://github.com/fxyu/com.example.iosSpeechRecognizer
Run the code
This plugin was modified base on helloworld Plugin
For more information on setting up Cordova see the documentation
For more info on plugins see the Plugin Development Guide