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).void
init()
Perform any component initialization.boolean
Checks if Festival is producing speech.protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Parse additional command-line argumentsboolean
Sends text to the speech production component.boolean
Sends text to the speech production component.boolean
Stops 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: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 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:
sayText
in interfaceSpeechProductionInterface
- Parameters:
text
- the text to be spoken
-
sayText
Sends text to the speech production component.- Specified by:
sayText
in 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:
isSpeaking
in interfaceSpeechProductionInterface
- Returns:
true
if speech is being produced,false
otherwise
-
stopUtterance
public boolean stopUtterance()Stops an ongoing utterance.- Specified by:
stopUtterance
in interfaceSpeechProductionInterface
- Returns:
true
if speech is interrupted,false
otherwise.
-
additionalUsageInfo
Provide additional information for usage...- Overrides:
additionalUsageInfo
in classDiarcComponent
- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Parse additional command-line arguments- Overrides:
parseArgs
in classDiarcComponent
-