com.sun.speech.freetts.jsapi
Class FreeTTSEngineCentral
java.lang.Object
com.sun.speech.freetts.jsapi.FreeTTSEngineCentral
- All Implemented Interfaces:
- javax.speech.EngineCentral
- public class FreeTTSEngineCentral
- extends java.lang.Object
- implements javax.speech.EngineCentral
Supports the EngineCentral JSAPI 1.0 interface for the
FreeTTSSynthesizer. To use a FreeTTSSynthesizer, you should place
a line into the speech.properties file as so:
FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral
Method Summary |
javax.speech.EngineList |
createEngineList(javax.speech.EngineModeDesc require)
Returns a list containing references to all matching
synthesizers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreeTTSEngineCentral
public FreeTTSEngineCentral()
throws java.lang.Exception
- Creates a FreeTTSEngineCentral
createEngineList
public javax.speech.EngineList createEngineList(javax.speech.EngineModeDesc require)
- Returns a list containing references to all matching
synthesizers. The mapping of FreeTTS VoiceDirectories and
Voices to JSAPI Synthesizers and Voices is as follows:
- Each FreeTTS VoiceDirectory specifies the list of FreeTTS
Voices supported by that directory. Each Voice in that
directory specifies its name (e.g., "kevin" "kevin16" "alan"),
domain (e.g., "general" or "time") and locale (e.g., Locale.US).
- For all FreeTTS Voices from all VoiceDirectories discovered
by the VoiceManager, this method will group the Voices
according to those that have both a common locale and domain
(e.g, all "general" domain voices for the US local will be
grouped together).
- For each group of voices that shares a common locale and
domain, this method generates a new JSAPI SynthesizerModeDesc
with the following attributes:
- The engine name is of the form: "FreeTTS <locale>
<domain> synthesizer" For example, "FreeTTS en_us general
synthesizer"
- The locale is the locale shared by all the voices (e.g.,
Locale.US)
- The mode name is the domain shared by all the voices
(e.g., "general").
- The JSAPI Voices for each resulting Synthesizer will have
the name of the FreeTTS Voice (e.g. "kevin" "kevin16").
- Specified by:
createEngineList
in interface javax.speech.EngineCentral
- Parameters:
require
- an engine mode that describes the desired
synthesizer
- Returns:
- an engineList containing matching engines, or null if
no matching engines are found