|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.speech.freetts.VoiceManager
Provides access to voices for all of FreeTTS. There is only one instance of the VoiceManager. Each call to getVoices() creates a new instance of each voice.
Voice
,
VoiceDirectory
Method Summary | |
boolean |
contains(java.lang.String voiceName)
Check if there is a voice provides with the given name. |
static VoiceManager |
getInstance()
Gets the instance of the VoiceManager |
Voice |
getVoice(java.lang.String voiceName)
Get a Voice with a given name. |
static java.net.URLClassLoader |
getVoiceClassLoader()
Gets the class loader used for loading dynamically detected jars. |
java.lang.String |
getVoiceInfo()
Prints detailed information about all available voices. |
Voice[] |
getVoices()
Provide an array of all voices available to FreeTTS. |
java.lang.String |
toString()
Provides a string representation of all voices available to FreeTTS. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static VoiceManager getInstance()
public Voice[] getVoices()
Second, the file internal_voices.txt is looked for in the same directory as VoiceManager.class. If the file does not exist, the VoiceManager moves on. Next, it looks for voices.txt in the same directory as freetts.jar. If the file does not exist, the VoiceManager moves on. Next, if the property "freetts.voicesfile" is defined, then that file is read in. If the property is defined and the file does not exist, then an error is raised.
Every voices file that is read in contains a list of VoiceDirectory class names.
Next, the voice manager looks for freetts voice jarfiles that may exist in well-known locations. The directory that contains freetts.jar is searched for voice jarfiles, then directories specified by the "freetts.voicespath" system property. Any jarfile whose Manifest contains "FreeTTSVoiceDefinition: true" is assumed to be a FreeTTS voice, and the Manifest's "Main-Class" entry is assumed to be the name of the voice directory. The dependencies of the voice jarfiles specified by the "Class-Path" Manifest entry are also loaded.
The VoiceManager instantiates each voice directory and calls getVoices() on each.
public java.lang.String getVoiceInfo()
public java.lang.String toString()
public boolean contains(java.lang.String voiceName)
voiceName
- the name of the voice to check
public Voice getVoice(java.lang.String voiceName)
voiceName
- the name of the voice to get.
public static java.net.URLClassLoader getVoiceClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |