public class VoiceRss extends AbstractSpeechSynthesis implements TextListener, AudioListener
Modifier and Type | Field and Description |
---|---|
boolean |
credentialsError |
java.lang.String |
key |
static org.slf4j.Logger |
log |
java.lang.Integer |
rate |
java.lang.String |
voice |
java.util.HashSet<java.lang.String> |
voices |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
VoiceRss(java.lang.String n) |
Modifier and Type | Method and Description |
---|---|
void |
addEar(SpeechRecognizer ear) |
AudioFile |
getAudioFile() |
java.lang.String |
getKey() |
java.lang.String |
getLanguage() |
java.util.List<java.lang.String> |
getLanguages() |
java.lang.String |
getLocalDirectory(SpeechSynthesis provider) |
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.Integer |
getRate() |
java.lang.String |
getVoice() |
java.util.ArrayList<java.lang.String> |
getVoices() |
float |
getVolume() |
void |
interrupt()
Interrupt the current speaking.
|
static void |
main(java.lang.String[] args) |
void |
onAudioEnd(AudioData data) |
void |
onAudioStart(AudioData data) |
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 |
setKey(java.lang.String key) |
void |
setLanguage(java.lang.String l) |
void |
setRate(java.lang.Integer rate) |
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/
|
void |
startService() |
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, 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 transient org.slf4j.Logger log
public java.lang.String voice
public java.util.HashSet<java.lang.String> voices
public java.lang.String key
public java.lang.Integer rate
public boolean credentialsError
public void startService()
startService
in interface ServiceInterface
startService
in class Service
public AudioFile getAudioFile()
public java.util.ArrayList<java.lang.String> getVoices()
getVoices
in interface SpeechSynthesis
public java.lang.String getVoice()
getVoice
in interface SpeechSynthesis
public boolean setVoice(java.lang.String voice)
setVoice
in interface SpeechSynthesis
public java.lang.String getKey()
public java.lang.Integer getRate()
public void setKey(java.lang.String key)
public void setRate(java.lang.Integer rate)
public void setLanguage(java.lang.String l)
setLanguage
in interface SpeechSynthesis
public 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 void onText(java.lang.String text)
onText
in interface TextListener
public java.lang.String getLanguage()
getLanguage
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 java.lang.String getLocalDirectory(SpeechSynthesis provider) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
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 void onRequestConfirmation(java.lang.String text)
onRequestConfirmation
in interface SpeechSynthesis
public java.util.List<java.lang.String> getLanguages()
getLanguages
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 void onAudioStart(AudioData data)
onAudioStart
in interface AudioListener
public void onAudioEnd(AudioData data)
onAudioEnd
in interface AudioListener
public static void main(java.lang.String[] args)
public static ServiceType getMetaData()