| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
Speakable interface can
be provided to the speak method of a
Synthesizer to be spoken.
The text is accessed through the getJSMLText method
making it the spoken equivalent of the toString method
of a Java object.
Applications can extend (nearly) any Java object to implement
the Speakable interface (strictly speaking, any non-final object).
Examples might include graphical objects or database entries.
The getJSMLText method returns text formatted
for the Java Speech Markup Language -- defined in the
Java Speech Markup Language specification.
JSML allows structural information (paragraphs and sentences),
production information (pronunciations, emphasis, breaks,
and prosody), and other miscellaneous markup. Appropriate
use of this markup improves the quality and understandability
of the synthesized speech.
The JSML text is a Unicode string and is assumed to contain
text of a single language (the language of the Synthesizer).
The text is treated as independent of other text output
on the synthesizer's text output queue, so, a sentence or
other important structure should be contained within a
single speakable object.
The standard XML header is optional for software-created
JSML documents. Thus, the getJSMLText method
is not required to provide the header.
A SpeakableListener can be attached to the
Synthesizer with the addSpeakableListener
method to receive all SpeakableEvents for
all Speakable objects on the output queue.
| Method Summary | |
| String | getJSMLText()
Return text to be spoken formatted for the Java Speech Markup Language. |
| Method Detail |
public String getJSMLText()
Speakable
object is passed to the speak method of a
Synthesizer. The text placed on the speaking queue
can be inspected through the SynthesizerQueueItem
on the speech output queue available through the synthesizer's
enumerateQueue method.
| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com