Package com.sun.speech.freetts.jsapi
Class FreeTTSSynthesizerModeDesc
java.lang.Object
SynthesizerModeDesc
com.sun.speech.freetts.jsapi.FreeTTSSynthesizerModeDesc
public class FreeTTSSynthesizerModeDesc
extends SynthesizerModeDesc
Represents a SynthesizerModeDesc for the
FreeTTSSynthesizer. A FreeTTSSynthesizerModeDesc adds
an audio player to the standard mode items.
-
Constructor Summary
ConstructorsConstructorDescriptionFreeTTSSynthesizerModeDesc
(String engineName, String modeName, Locale locale) Creates a fully-specified descriptor. -
Method Summary
Modifier and TypeMethodDescriptionEngine
Constructs a FreeTTSSynthesizer with the properties of this mode descriptor.javax.speech.synthesis.Voice[]
Returns the valid voices in this synthesizer mode.void
validate()
Returns true if this is a valid FreeTTSSynthesizerModeDesc.
-
Constructor Details
-
FreeTTSSynthesizerModeDesc
Creates a fully-specified descriptor. Any of the features may benull
.- Parameters:
engineName
- the name of the enginemodeName
- the name of the modelocale
- the locale associated with this mode
-
-
Method Details
-
getVoices
public javax.speech.synthesis.Voice[] getVoices()Returns the valid voices in this synthesizer mode.- Returns:
- an array of valid voices, if no valid voices, it will return an array of size 0
-
validate
Returns true if this is a valid FreeTTSSynthesizerModeDesc. It is valid if it contains at least one valid Voice. Returns false otherwise.- Throws:
ValidationException
- if this FreeTTSSynthesizerModeDesc is invalid
-
createEngine
Constructs a FreeTTSSynthesizer with the properties of this mode descriptor.- Returns:
- a synthesizer that mathes the mode
- Throws:
IllegalArgumentException
- if the properties of this descriptor do not match any known engine or modeEngineException
- if the engine could not be createdSecurityException
- if the caller does not have permission to use the speech engine
-