Package com.keenresearch.keenasr
Class KASRWord
java.lang.Object
com.keenresearch.keenasr.KASRWord
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 Summary
Modifier and TypeMethodDescriptionfloat
Confidence in the range 0 to 1 for the word.float
Duration, in seconds, for this word.Returns an array of KARSPhone objects that comprise this KASRWord.float
Start time, in seconds, for this word relative to when the recognizer started to listen.getText()
Text of the wordboolean
isTag()
False for real words, true for tags, e.g.toString()
String representation of this object.
-
Method Details
-
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
String representation of this object. Useful for debugging and logging purposes. -
getPhones
Returns an array of KARSPhone objects that comprise this KASRWord.- Returns:
- an array of KASRPhone objects
-