Class 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

      Constructors 
      Constructor Description
      FreeTTSSynthesizerModeDesc​(java.lang.String engineName, java.lang.String modeName, java.util.Locale locale)
      Creates a fully-specified descriptor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Engine createEngine()
      Constructs a FreeTTSSynthesizer with the properties of this mode descriptor.
      javax.speech.synthesis.Voice[] getVoices()
      Returns the valid voices in this synthesizer mode.
      void validate()
      Returns true if this is a valid FreeTTSSynthesizerModeDesc.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FreeTTSSynthesizerModeDesc

        public FreeTTSSynthesizerModeDesc​(java.lang.String engineName,
                                          java.lang.String modeName,
                                          java.util.Locale locale)
        Creates a fully-specified descriptor. Any of the features may be null.
        Parameters:
        engineName - the name of the engine
        modeName - the name of the mode
        locale - the locale associated with this mode
    • Method Detail

      • 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

        public void validate()
                      throws ValidationException
        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

        public Engine createEngine()
                            throws java.lang.IllegalArgumentException,
                                   EngineException,
                                   java.lang.SecurityException
        Constructs a FreeTTSSynthesizer with the properties of this mode descriptor.
        Returns:
        a synthesizer that mathes the mode
        Throws:
        java.lang.IllegalArgumentException - if the properties of this descriptor do not match any known engine or mode
        EngineException - if the engine could not be created
        java.lang.SecurityException - if the caller does not have permission to use the speech engine