Class VoiceDirectory

  • Direct Known Subclasses:
    MbrolaVoiceDirectory

    public abstract class VoiceDirectory
    extends java.lang.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:
    Voice, VoiceManager
    • Constructor Summary

      Constructors 
      Constructor Description
      VoiceDirectory()
      Default constructor does nothing.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Voice[] getVoices()
      Provide a means to access the voices in a voice jar file.
      static void main​(java.lang.String[] args)
      The main function must be implemented by subclasses to print out information about provided voices.
      java.lang.String toString()
      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 Detail

      • 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 Detail

      • 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 java.lang.String toString()
        Print the information about voices contained in this voice directory to a String.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String containing the information
        See Also:
        main(String[] args)
      • main

        public static void main​(java.lang.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:
        toString()