|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.implementation.jsapi10.Jsapi10SpokenInputFactory
public class Jsapi10SpokenInputFactory
Demo implementation of a
ResourceFactory for the
SpokenInput based on JSAPI 1.0.
Custom implementations are expected to override
registerEngineCentral() to register the JSAPI compliant
EngineCentral for the
Recognizer. Afterwards the default
mechanisms of JSAPI 1.0 are used to instantiate the
Recognizer.
The RecognizerModeDesc can be specified in the following ways:
setRecognizerModeDescriptor(RecognizerModeDesc) or byJVoiceXmlRecognizerModeDescFactory.
| Constructor Summary | |
|---|---|
Jsapi10SpokenInputFactory()
Creates a new object and registers the engines. |
|
| Method Summary | |
|---|---|
SpokenInput |
createResource()
|
int |
getInstances()
|
Class<SpokenInput> |
getResourceType()
|
String |
getType()
|
void |
registerEngineCentral()
Registers the EngineCentral so that a
Recognizer can be created via
Central.createRecognizer(javax.speech.EngineModeDesc). |
void |
setInstances(int number)
Sets the number of instances that this factory will create. |
void |
setRecognizerModeDescriptor(RecognizerModeDesc desc)
Sets the factory for the default RecognizerModeDesc. |
void |
setRecognizerModeDescriptorFactory(RecognizerModeDescFactory desc)
Sets the factory for the default RecognizerModeDesc. |
void |
setSynthesizedOutputConnectionHandler(SpokenInputConnectionHandler connectionHandler)
Sets a custom connection handler. |
void |
setType(String resourceType)
Sets the type of the resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Jsapi10SpokenInputFactory()
| Method Detail |
|---|
public void registerEngineCentral()
throws EngineException
EngineCentral so that a
Recognizer can be created via
Central.createRecognizer(javax.speech.EngineModeDesc).
EngineException - Error registering the engine central.
public final SpokenInput createResource()
throws NoresourceError
createResource in interface ResourceFactory<SpokenInput>NoresourceErrorpublic final void setInstances(int number)
number - Number of instances to create.public final int getInstances()
getInstances in interface ResourceFactory<SpokenInput>public final String getType()
getType in interface ResourceFactory<SpokenInput>public final void setType(String resourceType)
resourceType - type of the resource.public final void setRecognizerModeDescriptorFactory(RecognizerModeDescFactory desc)
RecognizerModeDesc.
desc - the factory.public final void setRecognizerModeDescriptor(RecognizerModeDesc desc)
RecognizerModeDesc.
desc - the factory.public final void setSynthesizedOutputConnectionHandler(SpokenInputConnectionHandler connectionHandler)
connectionHandler - the connection handler.public final Class<SpokenInput> getResourceType()
getResourceType in interface ResourceFactory<SpokenInput>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||