Class SpeechRecognitionEvent

java.lang.Object
org.openhab.core.voice.SpeechRecognitionEvent
All Implemented Interfaces:
STTEvent

@NonNullByDefault public class SpeechRecognitionEvent extends Object implements STTEvent
A STTEvent fired when the STTService recognizes speech.
Author:
Kelly Davis - Initial contribution
  • Constructor Details

    • SpeechRecognitionEvent

      public SpeechRecognitionEvent(String transcript, float confidence)
      Constructs an instance with the passed transcript and confidence. 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 speech
      confidence - The confidence of the transcript
  • Method Details

    • getTranscript

      public String 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.