2 * Copyright 2001 Sun Microsystems, Inc.
4 * See the file "license.terms" for information on usage and
5 * redistribution of this file, and for a DISCLAIMER OF ALL
8 package com.sun.speech.freetts.jsapi;
10 import javax.speech.Engine;
11 import javax.speech.synthesis.Speakable;
12 import javax.speech.synthesis.SpeakableEvent;
14 import com.sun.speech.engine.synthesis.BaseSynthesizer;
15 import com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem;
16 import com.sun.speech.freetts.FreeTTSSpeakable;
19 import java.io.IOException;
20 import java.io.InputStream;
22 import org.w3c.dom.Document;
23 import org.w3c.dom.Node;
24 import org.w3c.dom.Text;
27 * Represents an object on the speech output queue of a
28 * <code>FreeTTSSynthesizer</code>.
29 * Extends the BaseSynthesizerQueueItem by allowing access to the DOM
33 public class FreeTTSSynthesizerQueueItem extends BaseSynthesizerQueueItem
34 implements FreeTTSSpeakable {
36 * Construct a queue item.
38 public FreeTTSSynthesizerQueueItem() {
43 * Gets the DOM document for this object.
45 * @return the DOM document for this object.
47 public Document getDocument() {
48 return super.getDocument();
52 * Returns <code>true</code> if the item is an input stream
54 * @return true if the item is an input stream;
55 * otherwise, returns <code> false </code>
57 public boolean isStream() {
62 * Gets the input stream
64 * @return the input stream
66 public InputStream getInputStream() {
71 * Returns <code>true</code> if the item is a JSML document
72 * (Java Speech Markup Language text).
74 * @return <code> true </code> if the item is a document;
75 * otherwise, returns <code> false </code>
77 public boolean isDocument() {
78 return super.getDocument() != null;