Package edu.tufts.hrilab.simspeech
Class SimSpeechRecognitionComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.simspeech.SimSpeechRecognitionComponent
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerprotected BufferedReaderbooleanbooleanbooleanbooleanFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, shouldRunExecutionLoop -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the SimSpeechRecognitionComponent -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Provide additional information for usage...Get the configuration file for input buttons (mostly useful for the visualizer).Get the color specified for text (mostly useful for the visualizer).Get user input from terminal.boolean[]Get the flags relevant to visualization (mostly useful for the visualizer).protected voidinit()Perform any component initialization.protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Parse additional command-line argumentsvoidsetAddressee(Symbol addressee) voidsetSpeaker(Symbol speaker) voidSet input text (mostly useful for the visualizer).voidAny component that needs particular shutdown logic needs to override this method andMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown
-
Field Details
-
sbr
-
useUnk
public boolean useUnk -
useCommand
public boolean useCommand -
toLower
public boolean toLower -
useGui
public boolean useGui -
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:DiarcComponentPerform 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:
initin classDiarcComponent
-
getTextColor
Get the color specified for text (mostly useful for the visualizer).- Returns:
- the color text should be displayed in
-
getConfigFiles
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
Set input text (mostly useful for the visualizer).- Parameters:
in- the new speech input
-
setSpeaker
-
setAddressee
-
getUserInput
Get user input from terminal. -
additionalUsageInfo
Provide additional information for usage...- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Parse additional command-line arguments- Overrides:
parseArgsin classDiarcComponent
-
shutdownComponent
public void shutdownComponent()Description copied from class:DiarcComponentAny component that needs particular shutdown logic needs to override this method and- Overrides:
shutdownComponentin classDiarcComponent
-