Class AsrResultHypothesis

java.lang.Object
com.vivoka.vsdk.asr.utils.AsrResultHypothesis

public class AsrResultHypothesis extends Object
Represents a single hypothesis within an AsrResult. Contains timestamps, confidence, and recognized items (terminals or tags).
  • Field Details

    • startRule

      public String startRule
      The start rule (context#rule) used to generate this hypothesis. Example: "CmdModel#main".
    • confidence

      public int confidence
      Normalized confidence score for this hypothesis. Can be used to compare across multiple hypotheses.
    • beginTime

      public int beginTime
      Start time of the audio segment specific to this hypothesis.
    • endTime

      public int endTime
      End time of the audio segment specific to this hypothesis.
    • text

      public String text
      Recognized text specific to this hypothesis.
    • items

      public ArrayList<AsrResultItem> items
      List of recognized items (terminals or tags) forming a hierarchical structure.
  • Constructor Details

    • AsrResultHypothesis

      public AsrResultHypothesis()
      Constructs an AsrResultHypothesis object with empty values.
  • Method Details

    • getTags

      public ArrayList<AsrResultTag> getTags()
      Create a list of all tags specific to this hypothesis and returns them.
      Returns:
      All tags specific to this hypothesis.
    • getTerminals

      public ArrayList<AsrResultTerminal> getTerminals()
      Create a list of all terminals specific to this hypothesis and returns them.
      Returns:
      All terminals specific to this hypothesis.
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object