Package edu.tufts.hrilab.tts
Class MaryTTSComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.tts.MaryTTSComponent
- All Implemented Interfaces:
SpeechProductionInterface,VoiceProsodyInterface
public final class MaryTTSComponent
extends DiarcComponent
implements SpeechProductionInterface, VoiceProsodyInterface
-
Nested Class Summary
Nested Classes -
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>Command line options available in sub-class.voidaddNewWord(String word, byte[] pcmData) returns the current vocal emotiongetVoice()protected voidinit()Perform any component initialization.booleanChecks if speech is being produced.protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.booleanSpeaks appropriate text, blocking.booleanSpeaks appropriate textvoidsetEmotion(String newEmo) sets prosody to STRESS ANGER or CONFUSIONvoidbooleanStops 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
-
MaryTTSComponent
MaryTTSComponent constructor. Initializes TTS component.
-
-
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
-
isSpeaking
public boolean isSpeaking()Checks if speech is being produced.- 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.
-
setEmotion
sets prosody to STRESS ANGER or CONFUSION- Specified by:
setEmotionin interfaceVoiceProsodyInterface- Parameters:
newEmo- the new prosody to be used
-
getEmotion
returns the current vocal emotion- Specified by:
getEmotionin interfaceVoiceProsodyInterface
-
getVoice
- Specified by:
getVoicein interfaceVoiceProsodyInterface- Returns:
- the current voice used for TTS
-
setVoice
- Specified by:
setVoicein interfaceVoiceProsodyInterface- Parameters:
v- name of the voice or male or female
-
sayText
Description copied from interface:SpeechProductionInterfaceSpeaks appropriate text, blocking.- Specified by:
sayTextin interfaceSpeechProductionInterface- Parameters:
text- the text to be spoken
-
sayText
Speaks appropriate text- Specified by:
sayTextin interfaceSpeechProductionInterface- Parameters:
text- the text to be spokenwait- whether or not to block until speaking call returns- Returns:
- true if the text was generated as speech, false otherwise
-
getConfigFile
-
addNewWord
-
getGuiHelp
-
additionalUsageInfo
Description copied from class:DiarcComponentCommand line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentCalled directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgsin classDiarcComponent
-