|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.speech.engine.BaseEngine com.sun.speech.engine.synthesis.BaseSynthesizer com.sun.speech.engine.synthesis.text.TextSynthesizer
Supports a simple text-output-only JSAPI 1.0 Synthesizer
.
Intended for demonstration purposes for those developing JSAPI
implementations. It may also be useful to developers who want a
JSAPI synthesizer that doesn't produce any noise.
Nested Class Summary | |
class |
TextSynthesizer.OutputHandler
The output device for a TextSynthesizer . |
Field Summary |
Fields inherited from class com.sun.speech.engine.synthesis.BaseSynthesizer |
speakableListeners, voiceList |
Fields inherited from class com.sun.speech.engine.BaseEngine |
audioManager, CLEAR_ALL_STATE, engineListeners, engineModeDesc, engineProperties, engineState, engineStateLock |
Fields inherited from interface javax.speech.synthesis.Synthesizer |
QUEUE_EMPTY, QUEUE_NOT_EMPTY |
Fields inherited from interface javax.speech.Engine |
ALLOCATED, ALLOCATING_RESOURCES, DEALLOCATED, DEALLOCATING_RESOURCES, PAUSED, RESUMED |
Constructor Summary | |
TextSynthesizer(javax.speech.synthesis.SynthesizerModeDesc desc)
Creates a new Synthesizer in the DEALLOCATED state. |
Method Summary | |
protected void |
appendQueue(BaseSynthesizerQueueItem item)
Puts an item on the speaking queue and sends a queue updated event. |
void |
cancel()
Cancels the item at the top of the queue. |
void |
cancel(java.lang.Object source)
Cancels a specific object on the queue. |
void |
cancelAll()
Cancels all items on the output queue. |
protected BaseSynthesizerQueueItem |
createQueueItem()
Creates a TextSynthesizerQueueItem. |
java.util.Enumeration |
enumerateQueue()
Returns an enumeration of the queue. |
protected void |
handleAllocate()
Starts the output thread. |
protected void |
handleDeallocate()
Stops the output thread. |
protected void |
handlePause()
Pauses the output. |
protected void |
handleResume()
Resumes the output. |
Methods inherited from class com.sun.speech.engine.synthesis.BaseSynthesizer |
addSpeakableListener, createEngineProperties, dispatchSpeechEvent, fireQueueEmptied, fireQueueUpdated, getSynthesizerProperties, getVoiceList, phoneme, postQueueEmptied, postQueueUpdated, removeSpeakableListener, speak, speak, speak, speakPlainText, stateToString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.speech.Engine |
addEngineListener, allocate, deallocate, getAudioManager, getEngineModeDesc, getEngineProperties, getEngineState, getVocabManager, pause, removeEngineListener, resume, testEngineState, waitEngineState |
Constructor Detail |
public TextSynthesizer(javax.speech.synthesis.SynthesizerModeDesc desc)
desc
- the operating modeMethod Detail |
protected void handleAllocate()
handleAllocate
in class BaseEngine
BaseEngine.allocate()
protected void handleDeallocate()
handleDeallocate
in class BaseEngine
protected BaseSynthesizerQueueItem createQueueItem()
createQueueItem
in class BaseSynthesizer
public java.util.Enumeration enumerateQueue() throws javax.speech.EngineStateError
enumerateQueue
in interface javax.speech.synthesis.Synthesizer
enumerateQueue
in class BaseSynthesizer
Enumeration
of the speech output queue or
null
.
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statesprotected void appendQueue(BaseSynthesizerQueueItem item)
TextSynthesizerQueueItems
.
appendQueue
in class BaseSynthesizer
item
- the item to add to the queuepublic void cancel() throws javax.speech.EngineStateError
cancel
in interface javax.speech.synthesis.Synthesizer
cancel
in class BaseSynthesizer
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statespublic void cancel(java.lang.Object source) throws java.lang.IllegalArgumentException, javax.speech.EngineStateError
cancel
in interface javax.speech.synthesis.Synthesizer
cancel
in class BaseSynthesizer
source
- object to be removed from the speech output queue
java.lang.IllegalArgumentException
- if the source object is not found in the speech output queue.
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statespublic void cancelAll() throws javax.speech.EngineStateError
cancelAll
in interface javax.speech.synthesis.Synthesizer
cancelAll
in class BaseSynthesizer
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statesprotected void handlePause()
handlePause
in class BaseEngine
protected void handleResume()
handleResume
in class BaseEngine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |