public class MimicSpeech extends AbstractSpeechSynthesis implements TextListener
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
MimicSpeech(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() |
java.lang.String |
getMimicExecutable() |
java.lang.String |
getVoice() |
java.util.List<java.lang.String> |
getVoices() |
float |
getVolume() |
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 |
setLanguage(java.lang.String l) |
void |
setMimicExecutable(java.lang.String mimicExecutable) |
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/
|
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 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 l)
setLanguage
in interface SpeechSynthesis
public java.lang.String getLanguage()
getLanguage
in interface SpeechSynthesis
public java.util.List<java.lang.String> getLanguages()
getLanguages
in interface SpeechSynthesis
public AudioData speak(java.lang.String toSpeak) throws java.lang.Exception
SpeechSynthesis
speak
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.java.lang.Exception
- epublic boolean speakBlocking(java.lang.String toSpeak) throws java.lang.Exception
SpeechSynthesis
speakBlocking
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.java.lang.Exception
- epublic 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 getVoice()
getVoice
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 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 void onRequestConfirmation(java.lang.String text)
onRequestConfirmation
in interface SpeechSynthesis
public void onText(java.lang.String text)
onText
in interface TextListener
public java.lang.String getMimicExecutable()
public void setMimicExecutable(java.lang.String mimicExecutable)
public static ServiceType getMetaData()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception