Package com.sun.speech.freetts
Class VoiceDirectory
java.lang.Object
com.sun.speech.freetts.VoiceDirectory
- Direct Known Subclasses:
MbrolaVoiceDirectory
Provides a means to access the voices that are stored in a jar
file. Every jar file that provides a voice must contain a subclass
of VoiceDirectory. The class must provide a main() function that
calls dumpVoices() or performs an equivalent operation. All
subclasses of VoiceDirectory can be assumed to always be created by
the default constructor (no arguments).
Any jar file that has a subclass of VoiceDirectory must define
certain attributes in its Manifest. "Main-class:" must refer to
the subclass of VoiceDirectory. "Class-Path:" lists the other jar
files upon which this is dependent. For example,
"cmu_us_kal.jar" may be dependent on "en_us.jar" for its lexicon.
The Manifest must also have a "FreeTTSVoiceDefinition: true" entry.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Voice[]
Provide a means to access the voices in a voice jar file.static void
The main function must be implemented by subclasses to print out information about provided voices.toString()
Print the information about voices contained in this voice directory to a String.
-
Constructor Details
-
VoiceDirectory
public VoiceDirectory()Default constructor does nothing. This may be overridden by subclasses, but it is not recommended. This is the only constructor that will be called.
-
-
Method Details
-
getVoices
Provide a means to access the voices in a voice jar file. The implementation of this function is up to the subclasses.- Returns:
- an array of Voice instances provided in the jar file
-
toString
Print the information about voices contained in this voice directory to a String. -
main
The main function must be implemented by subclasses to print out information about provided voices. For example, they may just call dumpVoices()- See Also:
-