var NuanceSpeechKitPlugin = function() {
};
var NuanceSpeechKitPlugin = function() {
};
Initialize speech kit
credentialClassName
The class name to be loaded to retrieve the app id and keyserverName
The hostname of the server to connect toport
The port number for connectionsslEnabled
True if SSL is enabled for the connectionsuccessCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.initialize = function(credentialClassName,
serverName, port, sslEnabled,
successCallback, failureCallback) {
return Cordova.exec( successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"initSpeechKit",
[credentialClassName, serverName, port, sslEnabled]);
};
Clean up speech kit
successCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.cleanup = function(successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"cleanupSpeechKit",
[]);
};
Starts speech recognition
recoType
Type of recognition (dictation or websearch)language
Language code for recognitionsuccessCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.startRecognition = function(recoType, language,
successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"startRecognition",
[recoType, language]);
};
Stops speech recognition
successCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.stopRecognition = function(successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"stopRecognition",
[]);
};
Gets the last set of results from speech recognition
successCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.getResults = function(successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"getRecoResult",
[]);
};
Plays text using text to speech
text
The text to playlanguage
Language code for TTS playbackvoice
The voice to be used for TTS playbacksuccessCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.playTTS = function(text, language, voice,
successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"startTTS",
[text, language, voice]);
};
Stops text to speech playback
text
The text to playlanguage
Language code for TTS playbackvoice
The voice to be used for TTS playbacksuccessCallback
The callback function for successfailureCallback
The callback function for error
NuanceSpeechKitPlugin.prototype.stopTTS = function(successCallback, failureCallback) {
return Cordova.exec(successCallback,
failureCallback,
"PhoneGapSpeechPlugin",
"stopTTS",
[]);
};