Package com.sun.speech.freetts
Class FreeTTSSpeakableImpl
java.lang.Object
com.sun.speech.freetts.FreeTTSSpeakableImpl
- All Implemented Interfaces:
FreeTTSSpeakable
Minimal implementation of a FreeTTSSpeakable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Indicates that this speakable has been cancelled.void
Indicates that this speakable has been completed.Gets the DOM document for this object.Gets the input stream.getText()
Returns the text corresponding to this Playable.boolean
Returns true if this queue item has been processed.boolean
Returnstrue
if the item is a JSML document (Java Speech Markup Language).boolean
Returnstrue
if the item contains plain text (not Java Speech Markup Language text).boolean
isStream()
Returnstrue
if the item is an input stream.void
started()
Indicate that this speakable has been started.boolean
Waits for this speakable item to be completed.
-
Constructor Details
-
FreeTTSSpeakableImpl
Constructor.- Parameters:
text
- the text to be spoken
-
FreeTTSSpeakableImpl
Constructor.- Parameters:
doc
- the doc to be spoken
-
FreeTTSSpeakableImpl
Constructor.- Parameters:
is
- the doc to be spoken
-
-
Method Details
-
started
public void started()Indicate that this speakable has been started.- Specified by:
started
in interfaceFreeTTSSpeakable
-
completed
public void completed()Indicates that this speakable has been completed.- Specified by:
completed
in interfaceFreeTTSSpeakable
-
cancelled
public void cancelled()Indicates that this speakable has been cancelled.- Specified by:
cancelled
in interfaceFreeTTSSpeakable
-
isCompleted
public boolean isCompleted()Returns true if this queue item has been processed.- Specified by:
isCompleted
in interfaceFreeTTSSpeakable
- Returns:
- true if it has been processed
-
waitCompleted
public boolean waitCompleted()Waits for this speakable item to be completed.- Specified by:
waitCompleted
in interfaceFreeTTSSpeakable
- Returns:
- true if the item was completed successfully, false if the speakable was cancelled or an error occurred.
-
isPlainText
public boolean isPlainText()Returnstrue
if the item contains plain text (not Java Speech Markup Language text).- Specified by:
isPlainText
in interfaceFreeTTSSpeakable
- Returns:
- true if the item contains plain text
-
getText
Returns the text corresponding to this Playable.- Specified by:
getText
in interfaceFreeTTSSpeakable
- Returns:
- the Playable text
-
getDocument
Gets the DOM document for this object.- Specified by:
getDocument
in interfaceFreeTTSSpeakable
- Returns:
- the DOM document for this object.
-
isStream
public boolean isStream()Returnstrue
if the item is an input stream.- Specified by:
isStream
in interfaceFreeTTSSpeakable
- Returns:
- true if the item is an input stream
-
getInputStream
Gets the input stream.- Specified by:
getInputStream
in interfaceFreeTTSSpeakable
- Returns:
- the input stream
-
isDocument
public boolean isDocument()Returnstrue
if the item is a JSML document (Java Speech Markup Language).- Specified by:
isDocument
in interfaceFreeTTSSpeakable
- Returns:
- true if the item is a document
-