Class KASRWord

java.lang.Object
com.keenresearch.keenasr.KASRWord

public class KASRWord extends Object
An instance of the KIOSWord class, called word, provides word text, timing information, and the confidence of the word. Note that in certain circumstances startTime, duration, and confidence may be nil.
  • Method Details

    • getText

      public String getText()
      Text of the word
      Returns:
      text of the word
    • getStartTime

      public float getStartTime()
      Start time, in seconds, for this word relative to when the recognizer started to listen.
      Returns:
      word start time in seconds
    • getDuration

      public float getDuration()
      Duration, in seconds, for this word.
      Returns:
      word duration in seconds
    • getConfidence

      public float getConfidence()
      Confidence in the range 0 to 1 for the word. Higher value corresponds to better confidence that the recognized text matches what was said.
      Returns:
      confidence for the words
    • isTag

      public boolean isTag()
      False for real words, true for tags, e.g. <SPOKEN_NOISE>, <LAUGHTER>
      Returns:
      true is tag word, false otherwise
    • toString

      public String toString()
      String representation of this object. Useful for debugging and logging purposes.
      Overrides:
      toString in class Object
      Returns:
      string that contains word relevant information
    • getPhones

      public KASRPhone[] getPhones()
      Returns an array of KARSPhone objects that comprise this KASRWord.
      Returns:
      an array of KASRPhone objects