public class MarySpeech extends AbstractSpeechSynthesis implements TextListener
Modifier and Type | Field and Description |
---|---|
java.lang.String |
confirmationString |
static org.slf4j.Logger |
log |
java.lang.String |
maryComponentsUrl |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
MarySpeech(java.lang.String reservedKey) |
Modifier and Type | Method and Description |
---|---|
void |
addEar(SpeechRecognizer ear) |
java.lang.String |
getLanguage() |
java.util.List<java.lang.String> |
getLanguages() |
java.lang.String |
getLocalFileName(SpeechSynthesis provider,
java.lang.String toSpeak,
java.lang.String audioFileType) |
static ServiceType |
getMetaData()
This static method returns all the details of the class without it having
to be constructed.
|
java.lang.String |
getVoice() |
java.util.List<java.lang.String> |
getVoices() |
float |
getVolume() |
void |
installComponentsAcceptLicense(java.lang.String component) |
void |
installComponentsAcceptLicense(java.lang.String[] components) |
void |
interrupt()
Interrupt the current speaking.
|
static void |
main(java.lang.String[] args) |
void |
onRequestConfirmation(java.lang.String text) |
void |
onText(java.lang.String text) |
java.lang.String |
publishEndSpeaking(java.lang.String utterance)
stop callback for speech synth.
|
java.lang.String |
publishStartSpeaking(java.lang.String utterance)
start callback for speech synth.
|
void |
setAudioEffects(java.lang.String effects) |
void |
setLanguage(java.lang.String lang) |
boolean |
setVoice(java.lang.String voice) |
void |
setVolume(float volume) |
AudioData |
speak(java.lang.String toSpeak)
Begin speaking something and return immediately
|
boolean |
speakBlocking(java.lang.String toSpeak)
Begin speaking and wait until all speech has been played back/
|
boolean |
speakInternal(java.lang.String toSpeak,
boolean blocking) |
attach, attachTextPublisher, detach, detachTextPublisher
addListener, addListener, addTask, addTask, addTask, addTaskOneShot, allowDisplay, allowDisplay, attach, broadcastState, buildDna, buildDna, buildDnaKeys, buildDnaNames, clearLastError, close, containsTask, copyShallowFrom, createPeer, createPeer, createRootReserved, detach, detach, echoHeartbeat, error, error, error, getAttached, getCfgDir, getComm, getDeclaredMethodNames, getDeclaredMethods, getDescription, getDna, getDnaString, getHostName, getInbox, getInstanceId, getIntanceName, getInterfaceSet, getLastError, getMessageSet, getMetaData, getMethodMap, getMethodNames, getMethods, getMethodToolTip, getMsg, getName, getNotifyList, getNotifyListKeySet, getOutbox, getPeerKey, getPeerName, getServiceResourceFile, getSimpleName, getTasks, getThisThread, getType, hasError, hasPeers, help, help, in, info, info, invoke, invoke, invoke, invokeOn, isAttached, isAttached, isLocal, isReady, isRunning, isRuntime, isVirtual, load, load, logTimeEnable, mergeDna, mergeDna, mergePeerDna, movePeerDna, out, out, preProcessHook, preRoutingHook, publishError, publishQueueStats, publishState, publishStats, publishStatus, purgeTask, purgeTasks, releasePeers, releaseService, removeAllListeners, removeListener, requiresSecurity, reserve, reserve, reserveRoot, reserveRoot, reserveRootAs, run, save, save, save, send, send, send, send, sendBlocking, sendBlocking, sendBlocking, sendBlocking, sendPeer, setInstanceId, setName, setPeer, setSecurityProvider, setState, setThisThread, setVirtual, sleep, stackToString, startHeartbeat, startPeer, startPeer, startRecording, startService, stopHeartbeat, stopMsgRecording, stopService, subscribe, subscribe, subscribe, toString, unsubscribe, unsubscribe, unsubscribe, updateStats, warn, warn
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getName
public static final org.slf4j.Logger log
public java.lang.String maryComponentsUrl
public java.lang.String confirmationString
public boolean speakBlocking(java.lang.String toSpeak) throws marytts.exceptions.SynthesisException, java.lang.InterruptedException
SpeechSynthesis
speakBlocking
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.marytts.exceptions.SynthesisException
java.lang.InterruptedException
public boolean speakInternal(java.lang.String toSpeak, boolean blocking) throws marytts.exceptions.SynthesisException, java.lang.InterruptedException
marytts.exceptions.SynthesisException
java.lang.InterruptedException
public void onText(java.lang.String text)
onText
in interface TextListener
public AudioData speak(java.lang.String toSpeak) throws marytts.exceptions.SynthesisException, java.lang.InterruptedException
SpeechSynthesis
speak
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.marytts.exceptions.SynthesisException
java.lang.InterruptedException
public java.util.List<java.lang.String> getVoices()
getVoices
in interface SpeechSynthesis
public boolean setVoice(java.lang.String voice)
setVoice
in interface SpeechSynthesis
public void setLanguage(java.lang.String lang)
setLanguage
in interface SpeechSynthesis
public void onRequestConfirmation(java.lang.String text)
onRequestConfirmation
in interface SpeechSynthesis
public java.lang.String getLanguage()
getLanguage
in interface SpeechSynthesis
public void setVolume(float volume)
setVolume
in interface SpeechSynthesis
public float getVolume()
getVolume
in interface SpeechSynthesis
public void interrupt()
SpeechSynthesis
interrupt
in interface SpeechSynthesis
public java.lang.String publishStartSpeaking(java.lang.String utterance)
AbstractSpeechSynthesis
publishStartSpeaking
in interface SpeechSynthesis
publishStartSpeaking
in class AbstractSpeechSynthesis
utterance
- textpublic java.lang.String publishEndSpeaking(java.lang.String utterance)
AbstractSpeechSynthesis
publishEndSpeaking
in interface SpeechSynthesis
publishEndSpeaking
in class AbstractSpeechSynthesis
utterance
- textpublic java.lang.String getVoice()
getVoice
in interface SpeechSynthesis
public java.lang.String getLocalFileName(SpeechSynthesis provider, java.lang.String toSpeak, java.lang.String audioFileType) throws java.io.UnsupportedEncodingException
getLocalFileName
in interface SpeechSynthesis
java.io.UnsupportedEncodingException
public void addEar(SpeechRecognizer ear)
addEar
in interface SpeechSynthesis
public java.util.List<java.lang.String> getLanguages()
getLanguages
in interface SpeechSynthesis
public void setAudioEffects(java.lang.String effects)
public void installComponentsAcceptLicense(java.lang.String component)
public void installComponentsAcceptLicense(java.lang.String[] components)
public static void main(java.lang.String[] args)
public static ServiceType getMetaData()