Package edu.tufts.hrilab.simspeech
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.-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Provide additional information for usage...getText(long ts) Get the most recent text (if available).voidinit()Perform any component initialization.booleanChecks if Festival is producing speech.protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Parse additional command-line argumentsbooleanSends text to the speech production component.booleanSends text to the speech production component.booleanStops an ongoing utterance.Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Constructor Details
-
SimSpeechProductionComponent
public SimSpeechProductionComponent()
-
-
Method Details
-
init
public 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
-
getText
Get the most recent text (if available).- Returns:
- the text to display, or null
-
sayText
Sends text to the speech production component.- Specified by:
sayTextin interfaceSpeechProductionInterface- Parameters:
text- the text to be spoken
-
sayText
Sends text to the speech production component.- Specified by:
sayTextin interfaceSpeechProductionInterface- Parameters:
in- the text to be spokenwait- whether or not to block until speaking call returns
-
isSpeaking
public boolean isSpeaking()Checks if Festival is producing speech.- Specified by:
isSpeakingin interfaceSpeechProductionInterface- Returns:
trueif speech is being produced,falseotherwise
-
stopUtterance
public boolean stopUtterance()Stops an ongoing utterance.- Specified by:
stopUtterancein interfaceSpeechProductionInterface- Returns:
trueif speech is interrupted,falseotherwise.
-
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
-