|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alchar.jdtk.DECtalk
public class DECtalk
This class provides a API to the DECtalk software speech synthesizer. Due to the internal threading implementation in the speech synthesizer, direct access to the library by means of JNI is not possible. A client/server API is used instead.
| Field Summary | |
|---|---|
static int |
MSG_INDEX_MARK
|
static int |
MSG_STATUS
|
| Method Summary | |
|---|---|
void |
addBuffer(int maxChars,
int maxPhones,
int maxIndices)
Add a memory buffer with the given parameters. |
void |
addCallBackListener(CallBackListener listener)
Add a call back listener to the listener list of this object. |
void |
cbIndexMark(int dmy,
int mark)
Process a call back for an index mark. |
void |
cbStatus(int type,
int dmy)
Process a call back for a status message. |
void |
closeInMemory()
Close the current (in-memory) output buffer. |
void |
closeLogFile()
Close a previously opened log file. |
void |
closeWaveOutputFile()
Close a previously opened wave output file. |
Caps |
getCaps()
Return the capabilities of the synthesizer. |
static DECtalk |
getDECtalk()
Return a reference to the singleton DECtalk object. |
int |
getLanguage()
Return the currently selected language. |
int |
getRate()
Return the speaking rate. |
int |
getSpeaker()
Return the currently selected speaker. |
Status |
getStatus()
Return the status of the synthesizer. |
int |
getVolume(int channel)
Return the volume. |
void |
loadUserDict(String fileName)
Load a user dictionary from the given filename. |
static void |
main(String[] argv)
Method to implement a standalone test utility. |
void |
openInMem(String fileName,
int format)
Open an (in-memory) output buffer for the given output format. |
void |
openLogFile(String fileName,
int flags)
Open a log file with the given filename and options flag. |
void |
openWaveOutFile(String fileName,
int format)
Open an output file with the given filename for the given output format. |
void |
pause()
Pause the synthesizer output. |
void |
removeCallBackListener(CallBackListener listener)
Remove a call back listener from the listener list of this object. |
void |
reset(boolean fullReset)
Reste the synthesizer. |
void |
resume()
Resume the synthesizer output. |
Object |
returnBuffer()
Return the current (in-memory) buffer. |
void |
sendAudioStarted(CallBackEvent ev)
Send an audio started call back event. |
void |
sendAudioStopped(CallBackEvent ev)
Send an audio stopped call back event. |
void |
sendIndexMark(CallBackEvent ev)
Send an index mark call back event. |
void |
setLanguage(int language)
Set the language. |
void |
setRate(int rate)
Set the speaking rate. |
void |
setSpeaker(int speaker)
Set the speaker. |
void |
setVolume(int channel,
int level)
Set the volume for the given channel. |
void |
shutdown()
Terminate the execution of the speech synthesizer. |
void |
speak(String text)
Speak the given string with nirmal priority. |
void |
speakImmediately(String text)
Speak the given string with higher priority. |
void |
startup()
Initialize the synthesizer. |
void |
sync()
Force completion of queued text processing. |
void |
unloadUserDict()
Unload a previously loaded user dictionary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MSG_INDEX_MARK
public static final int MSG_STATUS
| Method Detail |
|---|
public static DECtalk getDECtalk()
public void addCallBackListener(CallBackListener listener)
listener - Call back listenerpublic void removeCallBackListener(CallBackListener listener)
listener - Call back listener
public void cbIndexMark(int dmy,
int mark)
dmy - Dummymark - Index mark idpublic void sendIndexMark(CallBackEvent ev)
ev - Call back event
public void cbStatus(int type,
int dmy)
type - Status typedmy - Dummypublic void sendAudioStarted(CallBackEvent ev)
ev - Call back eventpublic void sendAudioStopped(CallBackEvent ev)
ev - Call back event
public void addBuffer(int maxChars,
int maxPhones,
int maxIndices)
throws DECtalkException
maxChars - Maximum number of charactersmaxPhones - Maximum number of phonemesmaxIndices - Maximum number of index marks
DECtalkException - Operation failed
public void closeInMemory()
throws DECtalkException
DECtalkException - Operation failed
public void closeLogFile()
throws DECtalkException
DECtalkException - Operation failed
public void closeWaveOutputFile()
throws DECtalkException
DECtalkException - Operation failed
public Caps getCaps()
throws DECtalkException
DECtalkException - Operation failed
public int getLanguage()
throws DECtalkException
DECtalkException - Operation failed
public int getRate()
throws DECtalkException
DECtalkException - Operation failed
public int getSpeaker()
throws DECtalkException
DECtalkException - Operation failed
public Status getStatus()
throws DECtalkException
DECtalkException - Operation failed
public int getVolume(int channel)
throws DECtalkException
channel - Channel id
DECtalkException - Operation failed
public void loadUserDict(String fileName)
throws DECtalkException
fileName - File name
DECtalkException - Operation failed
public void openInMem(String fileName,
int format)
throws DECtalkException
format - Output format id
DECtalkException - Operation failed
public void openLogFile(String fileName,
int flags)
throws DECtalkException
fileName - File nameflags - Flags
DECtalkException - Operation failed
public void openWaveOutFile(String fileName,
int format)
throws DECtalkException
fileName - File nameformat - Output format id
DECtalkException - Operation failed
public void pause()
throws DECtalkException
DECtalkException - Operation failed
public void reset(boolean fullReset)
throws DECtalkException
fullReset - True if state should not be kept
DECtalkException - Operation failed
public void resume()
throws DECtalkException
DECtalkException - Operation failed
public Object returnBuffer()
throws DECtalkException
DECtalkException - Operation failed
public void setLanguage(int language)
throws DECtalkException
language - Language id
DECtalkException - Operation failed
public void setRate(int rate)
throws DECtalkException
rate - Rate
DECtalkException - Operation failed
public void setSpeaker(int speaker)
throws DECtalkException
speaker - Speaker id
DECtalkException - Operation failed
public void setVolume(int channel,
int level)
throws DECtalkException
channel - Channel idlevel - Volume level
DECtalkException - Operation failed
public void shutdown()
throws DECtalkException
DECtalkException - Operation failed
public void speak(String text)
throws DECtalkException
text - Text to be spoken
DECtalkException - Operation failed
public void speakImmediately(String text)
throws DECtalkException
text - Text to be spoken
DECtalkException - Operation failed
public void startup()
throws DECtalkException
DECtalkException - Operation failed
public void sync()
throws DECtalkException
DECtalkException - Operation failed
public void unloadUserDict()
throws DECtalkException
DECtalkException - Operation failedpublic static void main(String[] argv)
argv - Argument array
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2007-2009 Kris Van Hees. All Rights Reserved.