Package com.sun.speech.freetts
Class FreeTTSSpeakableImpl
- java.lang.Object
-
- com.sun.speech.freetts.FreeTTSSpeakableImpl
-
- All Implemented Interfaces:
FreeTTSSpeakable
public class FreeTTSSpeakableImpl extends java.lang.Object implements FreeTTSSpeakable
Minimal implementation of a FreeTTSSpeakable
-
-
Constructor Summary
Constructors Constructor Description FreeTTSSpeakableImpl(java.io.InputStream is)Constructor.FreeTTSSpeakableImpl(java.lang.String text)Constructor.FreeTTSSpeakableImpl(org.w3c.dom.Document doc)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelled()Indicates that this speakable has been cancelled.voidcompleted()Indicates that this speakable has been completed.org.w3c.dom.DocumentgetDocument()Gets the DOM document for this object.java.io.InputStreamgetInputStream()Gets the input stream.java.lang.StringgetText()Returns the text corresponding to this Playable.booleanisCompleted()Returns true if this queue item has been processed.booleanisDocument()Returnstrueif the item is a JSML document (Java Speech Markup Language).booleanisPlainText()Returnstrueif the item contains plain text (not Java Speech Markup Language text).booleanisStream()Returnstrueif the item is an input stream.voidstarted()Indicate that this speakable has been started.booleanwaitCompleted()Waits for this speakable item to be completed.
-
-
-
Constructor Detail
-
FreeTTSSpeakableImpl
public FreeTTSSpeakableImpl(java.lang.String text)
Constructor.- Parameters:
text- the text to be spoken
-
FreeTTSSpeakableImpl
public FreeTTSSpeakableImpl(org.w3c.dom.Document doc)
Constructor.- Parameters:
doc- the doc to be spoken
-
FreeTTSSpeakableImpl
public FreeTTSSpeakableImpl(java.io.InputStream is)
Constructor.- Parameters:
is- the doc to be spoken
-
-
Method Detail
-
started
public void started()
Indicate that this speakable has been started.- Specified by:
startedin interfaceFreeTTSSpeakable
-
completed
public void completed()
Indicates that this speakable has been completed.- Specified by:
completedin interfaceFreeTTSSpeakable
-
cancelled
public void cancelled()
Indicates that this speakable has been cancelled.- Specified by:
cancelledin interfaceFreeTTSSpeakable
-
isCompleted
public boolean isCompleted()
Returns true if this queue item has been processed.- Specified by:
isCompletedin interfaceFreeTTSSpeakable- Returns:
- true if it has been processed
-
waitCompleted
public boolean waitCompleted()
Waits for this speakable item to be completed.- Specified by:
waitCompletedin interfaceFreeTTSSpeakable- Returns:
- true if the item was completed successfully, false if the speakable was cancelled or an error occurred.
-
isPlainText
public boolean isPlainText()
Returnstrueif the item contains plain text (not Java Speech Markup Language text).- Specified by:
isPlainTextin interfaceFreeTTSSpeakable- Returns:
- true if the item contains plain text
-
getText
public java.lang.String getText()
Returns the text corresponding to this Playable.- Specified by:
getTextin interfaceFreeTTSSpeakable- Returns:
- the Playable text
-
getDocument
public org.w3c.dom.Document getDocument()
Gets the DOM document for this object.- Specified by:
getDocumentin interfaceFreeTTSSpeakable- Returns:
- the DOM document for this object.
-
isStream
public boolean isStream()
Returnstrueif the item is an input stream.- Specified by:
isStreamin interfaceFreeTTSSpeakable- Returns:
- true if the item is an input stream
-
getInputStream
public java.io.InputStream getInputStream()
Gets the input stream.- Specified by:
getInputStreamin interfaceFreeTTSSpeakable- Returns:
- the input stream
-
isDocument
public boolean isDocument()
Returnstrueif the item is a JSML document (Java Speech Markup Language).- Specified by:
isDocumentin interfaceFreeTTSSpeakable- Returns:
- true if the item is a document
-
-