Package com.sun.speech.engine.synthesis.text

# Class TextSynthesizerQueueItem

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 a `TextSynthesizer`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`BREAK`
`static final String[]`
`BREAK_ATTRIBUTES`
`static final String`
`COMMAND_PREFIX`
`static final String`
`COMMAND_SUFFIX`
`static final String`
`DATA_PREFIX`
`static final String`
`DATA_SUFFIX`
`static final String`
`DIV`
`static final String[]`
`DIV_ATTRIBUTES`
`static final String[][]`
`ELEMENT_ATTRIBUTES`
`static final String`
`ELEMENT_END`
`static final String`
`ELEMENT_START`
`static final String[]`
`ELEMENTS`
`static final String`
`EMPHASIS`
`static final String[]`
`EMPHASIS_ATTRIBUTES`
`static final String`
`ENGINE`
`static final String[]`
`ENGINE_ATTRIBUTES`
`static final String`
`JSML`
`static final String[]`
`JSML_ATTRIBUTES`
`static final String`
`MARKER`
`static final String[]`
`MARKER_ATTRIBUTES`
`static final String`
`PHONEME`
`static final String[]`
`PHONEME_ATTRIBUTES`
`static final String`
`PROSODY`
`static final String[]`
`PROSODY_ATTRIBUTES`
`static final String`
`SAYAS`
`static final String[]`
`SAYAS_ATTRIBUTES`
`static final String`
`VOICE`
`static final 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

Modifier and Type
Method
Description
`String`
`getEngineText()`
Gets the text form of this queue item.
`String`
`getTypeString()`
Gets the type of this queue item.
`protected void`
`linearize(Node n, StringBuffer buf)`
Appends the text for this node to the given StringBuffer.
`protected StringBuffer`
`processAttributes(Element element, String[] attributes)`
Gets the list of attributes of the element and returns them in a `StringBuffer`.
`protected StringBuffer`
`processElement(Element element, 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 StringBuffer`
`processNode(Node n, 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 Details

### JSML

public static final String JSML

See Also:
  - Constant Field Values

### JSML_ATTRIBUTES

public static final String[] JSML_ATTRIBUTES

### DIV

public static final String DIV

See Also:
  - Constant Field Values

### DIV_ATTRIBUTES

public static final String[] DIV_ATTRIBUTES

### VOICE

public static final String VOICE

See Also:
  - Constant Field Values

### VOICE_ATTRIBUTES

public static final String[] VOICE_ATTRIBUTES

### SAYAS

public static final String SAYAS

See Also:
  - Constant Field Values

### SAYAS_ATTRIBUTES

public static final String[] SAYAS_ATTRIBUTES

### PHONEME

public static final String PHONEME

See Also:
  - Constant Field Values

### PHONEME_ATTRIBUTES

public static final String[] PHONEME_ATTRIBUTES

### EMPHASIS

public static final String EMPHASIS

See Also:
  - Constant Field Values

### EMPHASIS_ATTRIBUTES

public static final String[] EMPHASIS_ATTRIBUTES

### BREAK

public static final String BREAK

See Also:
  - Constant Field Values

### BREAK_ATTRIBUTES

public static final String[] BREAK_ATTRIBUTES

### PROSODY

public static final String PROSODY

See Also:
  - Constant Field Values

### PROSODY_ATTRIBUTES

public static final String[] PROSODY_ATTRIBUTES

### MARKER

public static final String MARKER

See Also:
  - Constant Field Values

### MARKER_ATTRIBUTES

public static final String[] MARKER_ATTRIBUTES

### ENGINE

public static final String ENGINE

See Also:
  - Constant Field Values

### ENGINE_ATTRIBUTES

public static final String[] ENGINE_ATTRIBUTES

### ELEMENTS

public static final String[] ELEMENTS

### ELEMENT_ATTRIBUTES

public static final String[][] ELEMENT_ATTRIBUTES

### COMMAND_PREFIX

public static final String COMMAND_PREFIX

See Also:
  - Constant Field Values

### COMMAND_SUFFIX

public static final String COMMAND_SUFFIX

See Also:
  - Constant Field Values

### DATA_PREFIX

public static final String DATA_PREFIX

See Also:
  - Constant Field Values

### DATA_SUFFIX

public static final String DATA_SUFFIX

See Also:
  - Constant Field Values

### ELEMENT_START

public static final String ELEMENT_START

See Also:
  - Constant Field Values

### ELEMENT_END

public static final String ELEMENT_END

See Also:
  - Constant Field Values

## Constructor Details

### TextSynthesizerQueueItem

public TextSynthesizerQueueItem()
Class constructor.

## Method Details

### getTypeString

public String getTypeString()
Gets the type of this queue item.

Returns:
  a `String` for debug purposes

### linearize

protected void linearize(Node n, StringBuffer buf)
Appends the text for this node to the given StringBuffer.

Parameters:
  `n` - the node to traverse in depth-first order
  `buf` - the buffer to append text to

### processNode

protected StringBuffer processNode(Node n, 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 order
  `buf` - the buffer to append text to
Returns:
  a `String` containing text to undo the effects of the node

### processElement

protected StringBuffer processElement(Element element, 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 order
  `buf` - the buffer to append text to
Returns:
  a `String` containing text to undo the effects of the element

### processAttributes

protected StringBuffer processAttributes(Element element, String[] attributes)
Gets the list of attributes of the element and returns them in a `StringBuffer`.

Parameters:
  `element` - the element containing attributes (if any)
  `attributes` - the allowed attributes for `element`
Returns:
  a buffer containing the attributes in text form

### getEngineText

public String getEngineText()
Gets the text form of this queue item.

Returns:
  the text form of this queue item.