Class TextSynthesizerQueueItem
- java.lang.Object
-
- SynthesizerQueueItem
-
- com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
-
- com.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem
-
- All Implemented Interfaces:
SpeechEventDispatcher
public class TextSynthesizerQueueItem extends BaseSynthesizerQueueItem
Represents an object on the speech output queue of aTextSynthesizer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBREAKstatic java.lang.String[]BREAK_ATTRIBUTESstatic java.lang.StringCOMMAND_PREFIXstatic java.lang.StringCOMMAND_SUFFIXstatic java.lang.StringDATA_PREFIXstatic java.lang.StringDATA_SUFFIXstatic java.lang.StringDIVstatic java.lang.String[]DIV_ATTRIBUTESstatic java.lang.String[][]ELEMENT_ATTRIBUTESstatic java.lang.StringELEMENT_ENDstatic java.lang.StringELEMENT_STARTstatic java.lang.String[]ELEMENTSstatic java.lang.StringEMPHASISstatic java.lang.String[]EMPHASIS_ATTRIBUTESstatic java.lang.StringENGINEstatic java.lang.String[]ENGINE_ATTRIBUTESstatic java.lang.StringJSMLstatic java.lang.String[]JSML_ATTRIBUTESstatic java.lang.StringMARKERstatic java.lang.String[]MARKER_ATTRIBUTESstatic java.lang.StringPHONEMEstatic java.lang.String[]PHONEME_ATTRIBUTESstatic java.lang.StringPROSODYstatic java.lang.String[]PROSODY_ATTRIBUTESstatic java.lang.StringSAYASstatic java.lang.String[]SAYAS_ATTRIBUTESstatic java.lang.StringVOICEstatic java.lang.String[]VOICE_ATTRIBUTES-
Fields inherited from class com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
itemNumber, synth, thisItemNumber
-
-
Constructor Summary
Constructors Constructor Description TextSynthesizerQueueItem()Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEngineText()Gets the text form of this queue item.java.lang.StringgetTypeString()Gets the type of this queue item.protected voidlinearize(org.w3c.dom.Node n, java.lang.StringBuffer buf)Appends the text for this node to the given StringBuffer.protected java.lang.StringBufferprocessAttributes(org.w3c.dom.Element element, java.lang.String[] attributes)Gets the list of attributes of the element and returns them in aStringBuffer.protected java.lang.StringBufferprocessElement(org.w3c.dom.Element element, java.lang.StringBuffer buf)Adds any commands for this element and returns any text that might be needed to undo the effects of this element after it is processed.protected java.lang.StringBufferprocessNode(org.w3c.dom.Node n, java.lang.StringBuffer buf)Adds text for just this node, and returns any text that might be needed to undo the effects of this node after it is processed.-
Methods inherited from class com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
cancelled, completed, dispatchSpeechEvent, fireMarkerReached, fireSpeakableCancelled, fireSpeakableEnded, fireSpeakablePaused, fireSpeakableResumed, fireSpeakableStarted, fireTopOfQueue, fireWordStarted, getDocument, getItemNumber, isCancelled, isCompleted, postMarkerReached, postSpeakableCancelled, postSpeakableEnded, postSpeakablePaused, postSpeakableResumed, postSpeakableStarted, postTopOfQueue, postWordStarted, setData, setData, setData, started, waitCompleted
-
-
-
-
Field Detail
-
JSML
public static final java.lang.String JSML
- See Also:
- Constant Field Values
-
JSML_ATTRIBUTES
public static final java.lang.String[] JSML_ATTRIBUTES
-
DIV
public static final java.lang.String DIV
- See Also:
- Constant Field Values
-
DIV_ATTRIBUTES
public static final java.lang.String[] DIV_ATTRIBUTES
-
VOICE
public static final java.lang.String VOICE
- See Also:
- Constant Field Values
-
VOICE_ATTRIBUTES
public static final java.lang.String[] VOICE_ATTRIBUTES
-
SAYAS
public static final java.lang.String SAYAS
- See Also:
- Constant Field Values
-
SAYAS_ATTRIBUTES
public static final java.lang.String[] SAYAS_ATTRIBUTES
-
PHONEME
public static final java.lang.String PHONEME
- See Also:
- Constant Field Values
-
PHONEME_ATTRIBUTES
public static final java.lang.String[] PHONEME_ATTRIBUTES
-
EMPHASIS
public static final java.lang.String EMPHASIS
- See Also:
- Constant Field Values
-
EMPHASIS_ATTRIBUTES
public static final java.lang.String[] EMPHASIS_ATTRIBUTES
-
BREAK
public static final java.lang.String BREAK
- See Also:
- Constant Field Values
-
BREAK_ATTRIBUTES
public static final java.lang.String[] BREAK_ATTRIBUTES
-
PROSODY
public static final java.lang.String PROSODY
- See Also:
- Constant Field Values
-
PROSODY_ATTRIBUTES
public static final java.lang.String[] PROSODY_ATTRIBUTES
-
MARKER
public static final java.lang.String MARKER
- See Also:
- Constant Field Values
-
MARKER_ATTRIBUTES
public static final java.lang.String[] MARKER_ATTRIBUTES
-
ENGINE
public static final java.lang.String ENGINE
- See Also:
- Constant Field Values
-
ENGINE_ATTRIBUTES
public static final java.lang.String[] ENGINE_ATTRIBUTES
-
ELEMENTS
public static final java.lang.String[] ELEMENTS
-
ELEMENT_ATTRIBUTES
public static final java.lang.String[][] ELEMENT_ATTRIBUTES
-
COMMAND_PREFIX
public static final java.lang.String COMMAND_PREFIX
- See Also:
- Constant Field Values
-
COMMAND_SUFFIX
public static final java.lang.String COMMAND_SUFFIX
- See Also:
- Constant Field Values
-
DATA_PREFIX
public static final java.lang.String DATA_PREFIX
- See Also:
- Constant Field Values
-
DATA_SUFFIX
public static final java.lang.String DATA_SUFFIX
- See Also:
- Constant Field Values
-
ELEMENT_START
public static final java.lang.String ELEMENT_START
- See Also:
- Constant Field Values
-
ELEMENT_END
public static final java.lang.String ELEMENT_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeString
public java.lang.String getTypeString()
Gets the type of this queue item.- Returns:
- a
Stringfor debug purposes
-
linearize
protected void linearize(org.w3c.dom.Node n, java.lang.StringBuffer buf)Appends the text for this node to the given StringBuffer.- Parameters:
n- the node to traverse in depth-first orderbuf- the buffer to append text to
-
processNode
protected java.lang.StringBuffer processNode(org.w3c.dom.Node n, java.lang.StringBuffer buf)Adds text for just this node, and returns any text that might be needed to undo the effects of this node after it is processed.- Parameters:
n- the node to traverse in depth-first orderbuf- the buffer to append text to- Returns:
- a
Stringcontaining text to undo the effects of the node
-
processElement
protected java.lang.StringBuffer processElement(org.w3c.dom.Element element, java.lang.StringBuffer buf)Adds any commands for this element and returns any text that might be needed to undo the effects of this element after it is processed.- Parameters:
element- the element to traverse in depth-first orderbuf- the buffer to append text to- Returns:
- a
Stringcontaining text to undo the effects of the element
-
processAttributes
protected java.lang.StringBuffer processAttributes(org.w3c.dom.Element element, java.lang.String[] attributes)Gets the list of attributes of the element and returns them in aStringBuffer.- Parameters:
element- the element containing attributes (if any)attributes- the allowed attributes forelement- Returns:
- a buffer containing the attributes in text form
-
getEngineText
public java.lang.String getEngineText()
Gets the text form of this queue item.- Returns:
- the text form of this queue item.
-
-