public class IndianTts extends AbstractSpeechSynthesis implements TextListener, AudioListener
Modifier and Type | Field and Description |
---|---|
java.lang.String |
api |
boolean |
credentialsError |
static org.slf4j.Logger |
log |
java.lang.String |
userid |
java.lang.String |
voice |
java.util.HashMap<java.lang.String,java.lang.Integer> |
voiceMap |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
IndianTts(java.lang.String reservedKey) |
Modifier and Type | Method and Description |
---|---|
void |
addEar(SpeechRecognizer ear) |
AudioFile |
getAudioFile() |
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 |
getMp3Url(java.lang.String toSpeak) |
byte[] |
getRemoteFile(java.lang.String toSpeak) |
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 |
setLanguage(java.lang.String l) |
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.lang.String api
public java.lang.String userid
public boolean credentialsError
public java.util.HashMap<java.lang.String,java.lang.Integer> voiceMap
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 java.lang.String getMp3Url(java.lang.String toSpeak)
public byte[] getRemoteFile(java.lang.String toSpeak)
public boolean speakBlocking(java.lang.String toSpeak) throws java.io.IOException
SpeechSynthesis
speakBlocking
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.java.io.IOException
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 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.io.IOException
SpeechSynthesis
speak
in interface SpeechSynthesis
toSpeak
- - the string of text to speak.java.io.IOException
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 boolean setVoice(java.lang.String voice)
setVoice
in interface SpeechSynthesis
public void setLanguage(java.lang.String l)
setLanguage
in interface SpeechSynthesis
public static ServiceType getMetaData()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception