|
JSAPI 2.0 | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Synthesizer
s.
See:
Description
Interface Summary | |
---|---|
Speakable | Provides a standard method for obtaining markup text from an object. |
SpeakableListener | The listener interface for receiving notification of events during
processing of items on the Synthesizer output queue. |
Synthesizer | Provides primary access to speech synthesis capabilities. |
SynthesizerListener | The listener interface for receiving notification
of SynthesizerEvent s associated with a Synthesizer . |
SynthesizerProperties | Provides run-time control of the properties of a Synthesizer . |
Class Summary | |
---|---|
PhoneInfo | Provides dynamic information associated with a phoneme. |
SpeakableEvent | Event issued during processing of an item on the Synthesizer output queue. |
SpeakableExceptionDetail | Describes a problem found during processing of an
item placed on the Synthesizer output queue. |
SynthesizerEvent | Event issued by a Synthesizer to indicate a change
in state or other activity. |
SynthesizerMode | Provides information about a specific operating mode
of a Synthesizer . |
Voice | Describes one output Voice of a speech Synthesizer . |
Exception Summary | |
---|---|
SpeakableException | Thrown if a problem is found with an item
placed on the Synthesizer output queue. |
Provides interfaces and classes for using speech Synthesizer
s.
The Synthesizer
class provides methods to interact with speech synthesis
Engine
s.
The
Overview
provides more general information and includes a
Table of Examples
and a
Table of Diagrams.
Here is a "Hello World" example for synthesis:
import javax.speech.*;
import javax.speech.synthesis.*;
public class HelloWorld {
public static void main(String args[]) {
try {
// Create a synthesizer for the default speech locale
Synthesizer synth = (Synthesizer)
EngineManager.createEngine(SynthesizerMode.DEFAULT);
// Get it ready to speak
synth.allocate();
// Speak the "Hello world" string
synth.speak("Hello, world!", null);
// Clean up - includes waiting for the queue to empty
synth.deallocate();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
Synthesizer
,
EngineManager
|
JSAPI 2.0 | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.