class FreeTTSSynthesizer.OutputHandler extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
done |
protected Vector |
queue
Internal speech output queue that will contain a set of
FreeTTSSynthesizerQueueItems.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
OutputHandler()
Create a new OutputHandler for the given Synthesizer.
|
Modifier and Type | Method and Description |
---|---|
void |
appendQueue(FreeTTSSynthesizerQueueItem item)
Add an item to be spoken to the output queue.
|
protected void |
cancelAllItems()
Cancel all items in the queue
|
protected void |
cancelItem()
Cancel the current item
|
protected void |
cancelItem(Object source)
Cancel the given item.
|
Enumeration |
enumerateQueue()
Returns an enumeration of the queue
|
protected FreeTTSSynthesizerQueueItem |
getQueueItem()
Return, but do not remove, the first item on the queue.
|
boolean |
isQueueEmpty()
Determines if the input queue is empty
|
protected void |
outputItem(FreeTTSSynthesizerQueueItem item)
Outputs the given queue item to the current voice
|
private void |
queueDrained()
Should be called iff one or more items have been removed
from the queue.
|
protected void |
removeQueueItem(FreeTTSSynthesizerQueueItem item)
removes the given item, posting the appropriate
events.
|
void |
run()
Gets the next item from the queue and outputs it
|
void |
terminate()
shuts down this output handler
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected boolean done
public OutputHandler()
public void terminate()
public Enumeration enumerateQueue()
public boolean isQueueEmpty()
public void appendQueue(FreeTTSSynthesizerQueueItem item)
item
- the item to add to the queueprotected void cancelItem()
protected void cancelAllItems()
protected void cancelItem(Object source)
source
- the item to cancel.public void run()
protected FreeTTSSynthesizerQueueItem getQueueItem()
protected void removeQueueItem(FreeTTSSynthesizerQueueItem item)
item
- the item to removeprivate void queueDrained()
protected void outputItem(FreeTTSSynthesizerQueueItem item)
item
- the item to outputWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses