Class VoiceDirectory

java.lang.Object
com.sun.speech.freetts.VoiceDirectory
Direct Known Subclasses:
MbrolaVoiceDirectory

public abstract class VoiceDirectory extends Object
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
    Constructor
    Description
    Default constructor does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Voice[]
    Provide a means to access the voices in a voice jar file.
    static void
    main(String[] args)
    The main function must be implemented by subclasses to print out information about provided voices.
    Print the information about voices contained in this voice directory to a String.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public abstract Voice[] 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

      public String toString()
      Print the information about voices contained in this voice directory to a String.
      Overrides:
      toString in class Object
      Returns:
      a String containing the information
      See Also:
    • main

      public static void main(String[] args)
      The main function must be implemented by subclasses to print out information about provided voices. For example, they may just call dumpVoices()
      See Also: