Class SimSpeechProductionComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.simspeech.SimSpeechProductionComponent
All Implemented Interfaces:
SpeechProductionInterface

public class SimSpeechProductionComponent extends DiarcComponent implements SpeechProductionInterface
SimSpeechProductionComponent. Pops up a box for spoken text instead of playing it to a sound device.
  • Constructor Details

    • SimSpeechProductionComponent

      public SimSpeechProductionComponent()
  • Method Details

    • init

      public 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
    • getText

      public List<Object> getText(long ts)
      Get the most recent text (if available).
      Returns:
      the text to display, or null
    • sayText

      public boolean sayText(String text)
      Sends text to the speech production component.
      Specified by:
      sayText in interface SpeechProductionInterface
      Parameters:
      text - the text to be spoken
    • sayText

      public boolean sayText(String in, boolean wait)
      Sends text to the speech production component.
      Specified by:
      sayText in interface SpeechProductionInterface
      Parameters:
      in - the text to be spoken
      wait - whether or not to block until speaking call returns
    • isSpeaking

      public boolean isSpeaking()
      Checks if Festival is producing speech.
      Specified by:
      isSpeaking in interface SpeechProductionInterface
      Returns:
      true if speech is being produced, false otherwise
    • stopUtterance

      public boolean stopUtterance()
      Stops an ongoing utterance.
      Specified by:
      stopUtterance in interface SpeechProductionInterface
      Returns:
      true if speech is interrupted, false otherwise.
    • 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