Class SimSpeechRecognitionComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.simspeech.SimSpeechRecognitionComponent

public class SimSpeechRecognitionComponent extends DiarcComponent
SimSpeechRecognitionComponent provides a keyboard interface to replace a speech recognition component. Takes utterances directly from a text file and sends them to an NLP component.
  • Field Details

    • sbr

      protected BufferedReader sbr
    • useUnk

      public boolean useUnk
    • useCommand

      public boolean useCommand
    • toLower

      public boolean toLower
    • useGui

      public boolean useGui
    • textColor

      public Color textColor
    • log

      protected final org.slf4j.Logger log
  • Constructor Details

    • SimSpeechRecognitionComponent

      public SimSpeechRecognitionComponent()
      Constructs the SimSpeechRecognitionComponent
  • Method Details

    • init

      protected void init()
      Description copied from class: DiarcComponent
      Perform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.
      Overrides:
      init in class DiarcComponent
    • getTextColor

      public Color getTextColor()
      Get the color specified for text (mostly useful for the visualizer).
      Returns:
      the color text should be displayed in
    • getConfigFile

      public String getConfigFile()
      Get the configuration file for input buttons (mostly useful for the visualizer).
      Returns:
      the config file to use
    • getVisFlags

      public boolean[] getVisFlags()
      Get the flags relevant to visualization (mostly useful for the visualizer). Examples include whether to display the command box/button and the "unk" button.
      Returns:
      an array of boolean flags
    • setText

      public void setText(String in)
      Set input text (mostly useful for the visualizer).
      Parameters:
      in - the new speech input
    • setSpeaker

      public void setSpeaker(Symbol speaker)
    • setListener

      public void setListener(Symbol listener)
    • getUserInput

      public String getUserInput()
      Get user input from terminal.
    • additionalUsageInfo

      protected List<org.apache.commons.cli.Option> additionalUsageInfo()
      Provide additional information for usage...
      Overrides:
      additionalUsageInfo in class DiarcComponent
      Returns:
    • parseArgs

      protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine)
      Parse additional command-line arguments
      Overrides:
      parseArgs in class DiarcComponent
    • shutdownComponent

      public void shutdownComponent()
      Description copied from class: DiarcComponent
      Any component that needs particular shutdown logic needs to override this method and
      Overrides:
      shutdownComponent in class DiarcComponent