org.jvoicexml.implementation.jsapi10
Class Jsapi10SynthesizedOutputFactory

java.lang.Object
  extended by org.jvoicexml.implementation.jsapi10.Jsapi10SynthesizedOutputFactory
All Implemented Interfaces:
ResourceFactory<SynthesizedOutput>
Direct Known Subclasses:
FreeTTSSynthesizedOutputFactory

public class Jsapi10SynthesizedOutputFactory
extends Object
implements ResourceFactory<SynthesizedOutput>

Demo implementation of a ResourceFactory for the SynthesizedOutput based on JSAPI 1.0.

Custom implementations are expected to override registerEngineCentral() to register the JSAPI compliant EngineCentral for the Synthesizer. Afterwards the default mechanisms of JSAPI 1.0 are used to instantiate the Synthesizer.

The SynthesizerModeDesc can be specified in the following ways:

  1. setting the default descriptor directly via setSynthesizerModeDescriptor(SynthesizerModeDesc) or by
  2. using a JVoiceXmlSynthesizerModeDescFactory.

Since:
0.6
Version:
$Revision: 2355 $
Author:
Dirk Schnelle-Walka

Constructor Summary
Jsapi10SynthesizedOutputFactory()
          Creates a new object and registers the engines.
 
Method Summary
 SynthesizedOutput createResource()
          
 int getInstances()
          
 Class<SynthesizedOutput> getResourceType()
          
 String getType()
          
 void registerEngineCentral()
          Registers the EngineCentral so that a Synthesizer can be created via Central.createSynthesizer(javax.speech.EngineModeDesc).
 void setConnectionhandler(SynthesizedOutputConnectionHandler connectionHandler)
          Sets a custom connection handler.
 void setInstances(int number)
          Sets the number of instances that this factory will create.
 void setSynthesizerModeDescriptor(SynthesizerModeDesc desc)
          Sets the factory for the default SynthesizerModeDesc.
 void setSynthesizerModeDescriptorFactory(SynthesizerModeDescFactory desc)
          Sets the factory for the default SynthesizerModeDesc.
 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

Jsapi10SynthesizedOutputFactory

public Jsapi10SynthesizedOutputFactory()
Creates a new object and registers the engines.

Method Detail

registerEngineCentral

public void registerEngineCentral()
                           throws EngineException
Registers the EngineCentral so that a Synthesizer can be created via Central.createSynthesizer(javax.speech.EngineModeDesc).

Throws:
EngineException - Error registering the engine central.

createResource

public final SynthesizedOutput createResource()
                                       throws NoresourceError

Specified by:
createResource in interface ResourceFactory<SynthesizedOutput>
Throws:
NoresourceError

setInstances

public final void setInstances(int number)
Sets the number of instances that this factory will create.

Parameters:
number - Number of instances to create.

getInstances

public final int getInstances()

Specified by:
getInstances in interface ResourceFactory<SynthesizedOutput>

getType

public final String getType()

Specified by:
getType in interface ResourceFactory<SynthesizedOutput>

setType

public final void setType(String resourceType)
Sets the type of the resource.

Parameters:
resourceType - type of the resource.

setSynthesizerModeDescriptorFactory

public final void setSynthesizerModeDescriptorFactory(SynthesizerModeDescFactory desc)
Sets the factory for the default SynthesizerModeDesc.

Parameters:
desc - the factory.

setSynthesizerModeDescriptor

public final void setSynthesizerModeDescriptor(SynthesizerModeDesc desc)
Sets the factory for the default SynthesizerModeDesc.

Parameters:
desc - the factory.

setConnectionhandler

public final void setConnectionhandler(SynthesizedOutputConnectionHandler connectionHandler)
Sets a custom connection handler.

Parameters:
connectionHandler - the connection handler.

getResourceType

public final Class<SynthesizedOutput> getResourceType()

Specified by:
getResourceType in interface ResourceFactory<SynthesizedOutput>


Copyright © 2005-2009JVoiceXML group.