Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Interface javax.speech.EngineCreate


public abstract interface EngineCreate
The EngineCreate interface is implemented by EngineModeDesc objects obtained through calls to the EngineCentral objects of each speech engine registered with the Central class.

Note: most applications do not need to use this interface.

Each engine implementation must sub-class either RecognizerModeDesc or SynthesizerModeDesc to implement the EngineCreate interface. For example:

   public MyRecognizerModeDesc extends RecognizerModeDesc implements EngineCreate
   ...
     public Engine createEngine() {
       // Use mode desc propoerties to create an appropriate engine
     }
 
This implementation mechanism allows the engine to embed additional mode information (engine-specific mode identifiers, GUIDs etc) that simplify creation of the engine if requested by the Central class. The engine-specific mode descriptor may need to override equals and other methods if engine-specific features are defined.

The engine must perform the same security checks on access to speech engines as the Central class.

See Also:
Central, EngineCentral, EngineModeDesc, RecognizerModeDesc, SynthesizerModeDesc

Method Summary
Engine createEngine()
          Create an engine with the properties specified by this object.
 

Method Detail

createEngine

public Engine createEngine()
                                throws IllegalArgumentException,
                                       EngineException,
                                       SecurityException
Create an engine with the properties specified by this object. A new engine should be created in the DEALLOCATED state.

Throws:
IllegalArgumentException - The properties of the EngineModeDesc do not refer to a known engine or engine mode.
EngineException - The engine defined by this EngineModeDesc could not be properly created.
SecurityException - if the caller does not have createRecognizer permission but is attempting to create a Recognizer
See Also:
DEALLOCATED

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