Skip to main content
Version: Next

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

NameTypeDescriptionDefault ValueOptional?
categoryStringThe category of the inference result.N/ANo
confidenceFloatThe confidence level of the inference result, between 0 and 1.N/ANo
timeInt?The time at which the inference was performed, or null if not available.N/AYes

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

NameTypeDescriptionDefault ValueOptional?
textStringThe text of the recognized phrase.N/ANo

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

NameTypeDescriptionDefault ValueOptional?
commandStringThe command that was executed.N/ANo
successBooleanWhether the command was successful or not.N/ANo
messageString?An optional message or reason for failure, or null if no error occurred.N/AYes

Usage Example

val commandResult = CommandResult("command", true, "Command executed successfully")