public 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 and Description |
---|---|
class |
TextSynthesizer.OutputHandler
The output device for a
TextSynthesizer . |
Modifier and Type | Field and Description |
---|---|
(package private) TextSynthesizer.OutputHandler |
outputHandler
Reference to output thread.
|
Constructor and Description |
---|
TextSynthesizer(javax.speech.synthesis.SynthesizerModeDesc desc)
Creates a new Synthesizer in the DEALLOCATED state.
|
Modifier and Type | Method and 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(Object source)
Cancels a specific object on the queue.
|
void |
cancelAll()
Cancels all items on the output queue.
|
protected BaseSynthesizerQueueItem |
createQueueItem()
Creates a TextSynthesizerQueueItem.
|
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.
|
TextSynthesizer.OutputHandler outputHandler
public TextSynthesizer(javax.speech.synthesis.SynthesizerModeDesc desc)
desc
- the operating modeprotected void handleAllocate()
protected void handleDeallocate()
protected BaseSynthesizerQueueItem createQueueItem()
public Enumeration enumerateQueue() throws javax.speech.EngineStateError
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
.item
- the item to add to the queuepublic void cancel() throws javax.speech.EngineStateError
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statespublic void cancel(Object source) throws IllegalArgumentException, javax.speech.EngineStateError
source
- object to be removed from the speech output queueIllegalArgumentException
- 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
javax.speech.EngineStateError
- if this Synthesizer
in the DEALLOCATED
or
DEALLOCATING_RESOURCES
statesprotected void handlePause()
protected void handleResume()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses