JSAPI 2.0

javax.speech.synthesis
Interface Speakable


public interface Speakable

Provides a standard method for obtaining markup text from an object. An object implementing the Speakable interface can be provided to the speak method of a Synthesizer to be spoken.

This interface defines the spoken equivalent of the toString method of an object. Applications can extend objects to implement the Speakable interface. Examples might include graphical objects or database entries.

The getMarkupText method returns markup text formatted for the Speech Synthesis Markup Language defined in the Speech Synthesis Markup Language Specification. SSML allows structural information (paragraphs and sentences), production information (pronunciations, emphasis, breaks, and prosody), and other miscellaneous markup. Appropriate use of this markup can improve the quality and understandability of the synthesized speech.

The SpeakableEvent class describes specific events, sequencing of events, and the behavior of SpeakableListeners associated with Speakable objects.

See Also:
SpeakableListener, SpeakableEvent, Synthesizer, Synthesizer.speak(Speakable, SpeakableListener)

Method Summary
 String getMarkupText()
          Returns text to be spoken formatted in synthesis markup text.
 

Method Detail

getMarkupText

String getMarkupText()
Returns text to be spoken formatted in synthesis markup text. This method is called when a Speakable object is passed to the speak method of a Synthesizer. That method describes further details about the the expected format and processing of the markup text.

The markup text is treated independently from other items on the Synthesizer output queue, so, a sentence or other important structure should be contained within a single Speakable object.

Returns:
a String containing synthesis markup text
See Also:
speak, Synthesizer

JSAPI 2.0

JavaTM Speech API 2.0, Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.

Free Web Hosting