Java Speech API - The Java Speech API’s Classes and Interfaces

The Java Speech API’s Classes and Interfaces

The different classes and interfaces that form the Java Speech API are grouped into the following three packages:

  • javax.speech: Contains classes and interfaces for a generic speech engine.
  • javax.speech.synthesis: Contains classes and interfaces for speech synthesis.
  • javax.speech.recognition: Contains classes and interfaces for speech recognition.

The Central class is like a factory class that all Java Speech API applications use. It provides static methods to enable the access of speech synthesis and speech recognition engines. The Engine interface encapsulates the generic operations that a Java Speech API-compliant speech engine should provide for speech applications.

Speech applications can primarily use methods to perform actions such as retrieving the properties and state of the speech engine and allocating and deallocating resources for a speech engine. In addition, the Engine interface exposes mechanisms to pause and resume the audio stream generated or processed by the speech engine. The Engine interface is subclassed by the Synthesizer and Recognizer interfaces, which define additional speech synthesis and speech recognition functionality. The Synthesizer interface encapsulates the operations that a Java Speech API-compliant speech synthesis engine should provide for speech applications.

The Java Speech API is based on the event-handling model of AWT components. Events generated by the speech engine can be identified and handled as required. There are two ways to handle speech engine events: through the EngineListener interface or through the EngineAdapter class.

You can get more information about any classes and interfaces in the Java Speech API JavaDocs.

Read more about this topic:  Java Speech API

Famous quotes containing the words speech and/or classes:

    Speech and prose are not the same thing. They have different wave-lengths, for speech moves at the speed of light, where prose moves at the speed of the alphabet, and must be consecutive and grammatical and word-perfect. Prose cannot gesticulate. Speech can sometimes do nothing more.
    James Kenneth Stephens (1882–1950)

    What’s the greatest enemy of Christianity to-day? Frozen meat. In the past only members of the upper classes were thoroughly sceptical, despairing, negative. Why? Among other reasons, because they were the only people who could afford to eat too much meat. Now there’s cheap Canterbury lamb and Argentine chilled beef. Even the poor can afford to poison themselves into complete scepticism and despair.
    Aldous Huxley (1894–1963)