Package org.openhab.core.voice
Class SpeechRecognitionEvent
java.lang.Object
org.openhab.core.voice.SpeechRecognitionEvent
- All Implemented Interfaces:
STTEvent
A
STTEvent
fired when the STTService
recognizes speech.- Author:
- Kelly Davis - Initial contribution
-
Constructor Summary
ConstructorDescriptionSpeechRecognitionEvent
(String transcript, float confidence) Constructs an instance with the passedtranscript
andconfidence
. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the confidence of the transcript.Returns the transcript of the recognized speech.
-
Constructor Details
-
SpeechRecognitionEvent
Constructs an instance with the passedtranscript
andconfidence
. The confidence represents a numeric estimate between 0 and 1, inclusively, of how confident the recognition engine is of the transcript. A higher number means the system is more confident.- Parameters:
transcript
- The transcript of the recognized speechconfidence
- The confidence of the transcript
-
-
Method Details
-
getTranscript
Returns the transcript of the recognized speech.- Returns:
- The transcript of the recognized speech.
-
getConfidence
public float getConfidence()Returns the confidence of the transcript. The confidence represents a numeric estimate between 0 and 1, inclusively, of how confident the recognition engine is of the transcript. A higher number means the system is more confident.- Returns:
- The transcript of the recognized speech.
-