com.sun.speech.freetts.jsapi
public class FreeTTSSynthesizer extends BaseSynthesizer
speakableListeners, voiceList
audioManager, CLEAR_ALL_STATE, engineListeners, engineModeDesc, engineProperties, engineState, engineStateLock
Constructor and Description |
---|
FreeTTSSynthesizer(FreeTTSSynthesizerModeDesc desc)
Creates a new Synthesizer in the DEALLOCATED state.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendQueue(BaseSynthesizerQueueItem item)
Places an item on the speaking queue and send the queue update 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 BaseEngineProperties |
createEngineProperties()
Factory constructor for EngineProperties object.
|
protected BaseSynthesizerQueueItem |
createQueueItem()
Factory method to create a BaseSynthesizerQueueItem.
|
java.util.Enumeration |
enumerateQueue()
Returns an enumeration of the queue.
|
protected void |
handleAllocate()
Starts the output thread.
|
protected void |
handleDeallocate()
Handles a deallocation request.
|
protected void |
handlePause()
Pauses the output
|
protected void |
handleResume()
Resumes the output
|
addSpeakableListener, dispatchSpeechEvent, fireQueueEmptied, fireQueueUpdated, getSynthesizerProperties, getVoiceList, phoneme, postQueueEmptied, postQueueUpdated, removeSpeakableListener, speak, speak, speak, speakPlainText, stateToString
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, waitEngineState
public FreeTTSSynthesizer(FreeTTSSynthesizerModeDesc desc)
desc
- describes the allowed mode of operations for this
synthesizer.protected void handleAllocate() throws EngineException
handleAllocate
in class BaseEngine
EngineException
- if an allocation error occursBaseEngine.allocate()
protected void handleDeallocate() throws EngineException
handleDeallocate
in class BaseEngine
EngineException
- if a deallocation error occursprotected BaseSynthesizerQueueItem createQueueItem()
createQueueItem
in class BaseSynthesizer
public java.util.Enumeration enumerateQueue() throws EngineStateError
enumerateQueue
in class BaseSynthesizer
EngineStateError
- if the engine was not in the proper
stateprotected void appendQueue(BaseSynthesizerQueueItem item)
appendQueue
in class BaseSynthesizer
item
- the item to place in the queuepublic void cancel() throws EngineStateError
cancel
in class BaseSynthesizer
EngineStateError
- if the synthesizer is not in the
proper statepublic void cancel(java.lang.Object source) throws java.lang.IllegalArgumentException, EngineStateError
cancel
in class BaseSynthesizer
source
- the object to canceljava.lang.IllegalArgumentException
- if the source object is not
currently in the queueEngineStateError
- the synthesizer is not in the
proper statepublic void cancelAll() throws EngineStateError
cancelAll
in class BaseSynthesizer
EngineStateError
protected void handlePause()
handlePause
in class BaseEngine
protected void handleResume()
handleResume
in class BaseEngine
protected BaseEngineProperties createEngineProperties()
createEngineProperties
in class BaseSynthesizer
BaseEngineProperties
object specific to
a subclass.