Result
com.surpuissant.kws.sdk
InferenceResult Class
The InferenceResult
data class represents an inference result. It contains information about the category, confidence level, and time of the inference.
Properties
Name | Type | Description | Default Value | Optional? |
---|---|---|---|---|
category | String | The category of the inference result. | N/A | No |
confidence | Float | The confidence level of the inference result, between 0 and 1. | N/A | No |
time | Int? | The time at which the inference was performed, or null if not available. | N/A | Yes |
Usage Example
val inferenceResult = InferenceResult("category", 0.8f, null)
PhraseResult Class
The PhraseResult
data class represents a phrase result from the KWS SDK. It contains information about the text of the recognized phrase.
Properties
Name | Type | Description | Default Value | Optional? |
---|---|---|---|---|
text | String | The text of the recognized phrase. | N/A | No |
Usage Example
val phraseResult = PhraseResult("recognized phrase")
CommandResult Class
The CommandResult
data class represents a command result from the KWS SDK. It contains information about whether the command was successful, and an optional message or reason for failure.
Properties
Name | Type | Description | Default Value | Optional? |
---|---|---|---|---|
command | String | The command that was executed. | N/A | No |
success | Boolean | Whether the command was successful or not. | N/A | No |
message | String? | An optional message or reason for failure, or null if no error occurred. | N/A | Yes |
Usage Example
val commandResult = CommandResult("command", true, "Command executed successfully")