TextWSRecognizer Class
Text WebSocket recognizer interface
Constructor
TextWSRecognizer
(
-
callback -
[host='cloud.myscript.com']
Parameters:
-
callbackFunctionThe WebSocket response callback
-
[host='cloud.myscript.com']String optionalRecognition service host
Item Index
Methods
_computeHmac
(
private
-
input -
applicationKey -
hmacKey
Compute HMAC signature for server authentication
Parameters:
-
inputString -
applicationKeyString -
hmacKeyString
close
()
Close the socket
continueWSRecognition
(
-
components -
instanceId
Continue the recognition
Parameters:
-
componentsAbstractComponent[] | TextInputUnit[] -
instanceIdString
getHost
()
String | String |
Get the recognition service host
Returns:
String | String | :
getPrecision
()
Number
Get precision
Returns:
Number:
initWSRecognition
(
-
applicationKey
Initialize the WebSocket
Parameters:
-
applicationKeyString
open
()
Open the socket
resetWSRecognition
()
Reset the WebSocket recognition session
setHost
(
-
UNKNOWN
Set the recognition service host
Parameters:
-
UNKNOWNString
setPrecision
(
-
precision
Set precision
Parameters:
-
precisionNumber
startWSRecognition
(
-
components -
[parameters]
Start the WebSocket session
Parameters:
-
componentsAbstractComponent[] | TextInputUnit[] -
[parameters]TextParameter optional
takeUpHmacChallenge
(
-
applicationKey -
challenge -
hmacKey
Authenticate the WebSocket client end with a handshake of HMAC signature
Parameters:
-
applicationKeyString -
challengeString -
hmacKeyString
