com.sun.speech.freetts.en.us
Class CMUVoice

java.lang.Object
  extended bycom.sun.speech.freetts.Voice
      extended bycom.sun.speech.freetts.en.us.CMUVoice
All Implemented Interfaces:
Dumpable, UtteranceProcessor
Direct Known Subclasses:
CMUClusterUnitVoice, CMUDiphoneVoice, MbrolaVoice

public abstract class CMUVoice
extends Voice

Provides generic support for a CMU Voice


Field Summary
 
Fields inherited from class com.sun.speech.freetts.Voice
DATABASE_NAME, DEFAULT_AUDIO_PLAYER, DEFAULT_AUDIO_PLAYER_DEFAULT, FEATURE_JOIN_TYPE, FEATURE_SILENCE, PROP_PREFIX
 
Constructor Summary
CMUVoice(java.lang.String name, Gender gender, Age age, java.lang.String description, java.util.Locale locale, java.lang.String domain, java.lang.String organization, CMULexicon lexicon)
          Creates a simple voice
 
Method Summary
protected  UtteranceProcessor getAudioOutput()
          Returns the AudioOutput processor to be used by this voice Derived voices typically override this to customize behaviors.
 java.lang.String getPhoneFeature(java.lang.String phone, java.lang.String featureName)
          Given a phoneme and a feature name, return the feature
protected  UtteranceProcessor getPitchmarkGenerator()
          Returns the pitch mark generator to be used by this voice Derived voices typically override this to customize behaviors.
protected  UtteranceProcessor getPostLexicalAnalyzer()
          Returns the post lexical processor to be used by this voice.
 Tokenizer getTokenizer()
          Gets a tokenizer for this voice
protected  UtteranceProcessor getUnitConcatenator()
          Returns the unit concatenator to be used by this voice Derived voices typically override this to customize behaviors.
protected  UtteranceProcessor getUnitSelector()
          Returns the unit selector to be used by this voice Derived voices typically override this to customize behaviors.
protected  void loader()
          Called by Voice during loading, derived voices should override this to provide customized loading.
protected  void setupFeatureProcessors()
          Sets up the FeatureProcessors for this Voice.
protected  void setupFeatureSet()
          Sets up the FeatureSet for this Voice.
protected  void setupUtteranceProcessors()
          Sets up the utterance processors for this voice.
 java.lang.String toString()
          Converts this object to its String representation
 
Methods inherited from class com.sun.speech.freetts.Voice
addFeatureProcessor, allocate, createOutputThread, deallocate, dump, dumpProcessors, endBatch, error, getAge, getAudioPlayer, getDefaultAudioPlayer, getDescription, getDomain, getDurationStretch, getFeatureProcessor, getFeatures, getGender, getLexicon, getLocale, getName, getOrganization, getOutputQueue, getPitch, getPitchRange, getPitchShift, getRate, getResource, getRunTitle, getStyle, getUtteranceProcessors, getVolume, getWaveDumpFile, isDetailedMetrics, isDumpRelations, isDumpUtterance, isLoaded, isMetrics, isVerbose, load, log, processNode, processUtterance, setAge, setAudioPlayer, setDescription, setDetailedMetrics, setDomain, setDumpRelations, setDumpUtterance, setDurationStretch, setGender, setLexicon, setLoaded, setLocale, setMetrics, setName, setOrganization, setOutputQueue, setPitch, setPitchRange, setPitchShift, setRate, setRunTitle, setStyle, setVerbose, setVolume, setWaveDumpFile, speak, speak, speak, speak, startBatch, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMUVoice

public CMUVoice(java.lang.String name,
                Gender gender,
                Age age,
                java.lang.String description,
                java.util.Locale locale,
                java.lang.String domain,
                java.lang.String organization,
                CMULexicon lexicon)
Creates a simple voice

Parameters:
name - the name of the voice
gender - the gender of the voice
age - the age of the voice
description - a human-readable string providing a description that can be displayed for the users.
locale - the locale of the voice
domain - the domain of this voice. For example,
organization - the organization which created the voice "general", "time", or "weather".
lexicon - the lexicon to load
Method Detail

loader

protected void loader()
               throws java.io.IOException
Called by Voice during loading, derived voices should override this to provide customized loading.

Specified by:
loader in class Voice
Throws:
java.io.IOException

setupFeatureSet

protected void setupFeatureSet()
                        throws java.io.IOException
Sets up the FeatureSet for this Voice.

Throws:
java.io.IOException - if an I/O error occurs

setupUtteranceProcessors

protected void setupUtteranceProcessors()
                                 throws java.io.IOException
Sets up the utterance processors for this voice. Subclasses should define this method to setup the utterance processors for the voice.

Throws:
java.io.IOException - throws an IOException if an error occurs

getPostLexicalAnalyzer

protected UtteranceProcessor getPostLexicalAnalyzer()
                                             throws java.io.IOException
Returns the post lexical processor to be used by this voice. Derived voices typically override this to customize behaviors.

Returns:
the post lexical analyzer in use by this voice
Throws:
java.io.IOException - if an IO error occurs while getting processor

getUnitSelector

protected UtteranceProcessor getUnitSelector()
                                      throws java.io.IOException
Returns the unit selector to be used by this voice Derived voices typically override this to customize behaviors.

Returns:
the unit selector in use by this voice
Throws:
java.io.IOException - if an IO error occurs while getting processor

getPitchmarkGenerator

protected UtteranceProcessor getPitchmarkGenerator()
                                            throws java.io.IOException
Returns the pitch mark generator to be used by this voice Derived voices typically override this to customize behaviors.

Returns:
the pitch mark generator to be used by this voice
Throws:
java.io.IOException - if an IO error occurs while getting processor

getUnitConcatenator

protected UtteranceProcessor getUnitConcatenator()
                                          throws java.io.IOException
Returns the unit concatenator to be used by this voice Derived voices typically override this to customize behaviors.

Returns:
the Unit concatenator
Throws:
java.io.IOException - if an IO error occurs while getting processor

setupFeatureProcessors

protected void setupFeatureProcessors()
                               throws java.io.IOException
Sets up the FeatureProcessors for this Voice.

Throws:
java.io.IOException - if an I/O error occurs

getPhoneFeature

public java.lang.String getPhoneFeature(java.lang.String phone,
                                        java.lang.String featureName)
Given a phoneme and a feature name, return the feature

Overrides:
getPhoneFeature in class Voice
Parameters:
phone - the phoneme of interest
featureName - the name of the feature of interest
Returns:
the feature with the given name

getAudioOutput

protected UtteranceProcessor getAudioOutput()
                                     throws java.io.IOException
Returns the AudioOutput processor to be used by this voice Derived voices typically override this to customize behaviors.

Specified by:
getAudioOutput in class Voice
Returns:
the audio output processor
Throws:
java.io.IOException - if an IO error occurs while getting processor

getTokenizer

public Tokenizer getTokenizer()
Gets a tokenizer for this voice

Specified by:
getTokenizer in class Voice
Returns:
the tokenizer

toString

public java.lang.String toString()
Converts this object to its String representation

Overrides:
toString in class Voice
Returns:
the string representation of this object