SpeechEventDispatcherpublic class TextSynthesizer extends BaseSynthesizer
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.| Modifier and Type | Class | Description |
|---|---|---|
class |
TextSynthesizer.OutputHandler |
The output device for a
TextSynthesizer. |
audioManager, CLEAR_ALL_STATE, engineListeners, engineModeDesc, engineProperties, engineState, engineStateLockspeakableListeners, voiceList| Constructor | Description |
|---|---|
TextSynthesizer(SynthesizerModeDesc desc) |
Creates a new Synthesizer in the DEALLOCATED state.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
addEngineListener, allocate, checkEngineState, deallocate, fireEngineAllocated, fireEngineAllocatingResources, fireEngineDeallocated, fireEngineDeallocatingResources, fireEnginePaused, fireEngineResumed, getAudioManager, getEngineModeDesc, getEngineProperties, getEngineState, getVocabManager, pause, postEngineAllocated, postEngineAllocatingResources, postEngineDeallocated, postEngineDeallocatingResources, postEnginePaused, postEngineResumed, removeEngineListener, resume, setEngineModeDesc, setEngineState, testEngineState, toString, waitEngineStateaddSpeakableListener, createEngineProperties, dispatchSpeechEvent, fireQueueEmptied, fireQueueUpdated, getSynthesizerProperties, getVoiceList, phoneme, postQueueEmptied, postQueueUpdated, removeSpeakableListener, speak, speak, speak, speakPlainText, stateToStringpublic TextSynthesizer(SynthesizerModeDesc desc)
desc - the operating modeprotected void handleAllocate()
handleAllocate in class BaseEngineBaseEngine.allocate()protected void handleDeallocate()
handleDeallocate in class BaseEngineprotected BaseSynthesizerQueueItem createQueueItem()
createQueueItem in class BaseSynthesizerpublic java.util.Enumeration enumerateQueue()
throws EngineStateError
enumerateQueue in class BaseSynthesizerEnumeration of the speech output queue or
null.EngineStateError - if this Synthesizer in the DEALLOCATED or
DEALLOCATING_RESOURCES statesprotected void appendQueue(BaseSynthesizerQueueItem item)
TextSynthesizerQueueItems.appendQueue in class BaseSynthesizeritem - the item to add to the queuepublic void cancel()
throws EngineStateError
cancel in class BaseSynthesizerEngineStateError - if this Synthesizer in the DEALLOCATED or
DEALLOCATING_RESOURCES statespublic void cancel(java.lang.Object source)
throws java.lang.IllegalArgumentException,
EngineStateError
cancel in class BaseSynthesizersource - object to be removed from the speech output queuejava.lang.IllegalArgumentException - if the source object is not found in the speech output queue.EngineStateError - if this Synthesizer in the DEALLOCATED or
DEALLOCATING_RESOURCES statespublic void cancelAll()
throws EngineStateError
cancelAll in class BaseSynthesizerEngineStateError - if this Synthesizer in the DEALLOCATED or
DEALLOCATING_RESOURCES statesprotected void handlePause()
handlePause in class BaseEngineprotected void handleResume()
handleResume in class BaseEngine