marytts.tools.voiceimport
Class PhoneFeatureFileWriter

java.lang.Object
  extended by marytts.tools.voiceimport.VoiceImportComponent
      extended by marytts.tools.voiceimport.PhoneFeatureFileWriter
Direct Known Subclasses:
HalfPhoneFeatureFileWriter

public class PhoneFeatureFileWriter
extends VoiceImportComponent


Field Summary
protected  FeatureDefinition featureDefinition
           
 java.lang.String FEATUREDIR
           
protected  java.lang.String featureExt
           
 java.lang.String FEATUREFILE
           
protected  java.io.File maryDir
           
protected  java.lang.String name
           
protected  int percent
           
 java.lang.String UNITFILE
           
protected  UnitFileReader unitFileReader
           
 java.lang.String WEIGHTSFILE
           
 
Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent
bnl, logger, props, props2Help
 
Constructor Summary
PhoneFeatureFileWriter()
           
 
Method Summary
 boolean compute()
          Do the computations required by this component.
 java.util.SortedMap getDefaultProps(DatabaseLayout db)
          Get the map of properties2values containing the default values
 java.lang.String getName()
          Get the name of this component
 int getProgress()
          Provide the progress of computation, in percent, or -1 if that feature is not implemented.
 void initialiseComp()
          Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
static void main(java.lang.String[] args)
           
protected  void setupHelp()
           
protected  void writeHeaderTo(java.io.DataOutput out)
          Write the header of this feature file to the given DataOutput
protected  void writeUnitFeaturesTo(java.io.DataOutput out)
           
 
Methods inherited from class marytts.tools.voiceimport.VoiceImportComponent
getHelpText, getHelpTextForProp, getProp, initialise, setProp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maryDir

protected java.io.File maryDir

featureDefinition

protected FeatureDefinition featureDefinition

percent

protected int percent

featureExt

protected java.lang.String featureExt

unitFileReader

protected UnitFileReader unitFileReader

name

protected java.lang.String name

FEATUREDIR

public java.lang.String FEATUREDIR

FEATUREFILE

public java.lang.String FEATUREFILE

UNITFILE

public java.lang.String UNITFILE

WEIGHTSFILE

public java.lang.String WEIGHTSFILE
Constructor Detail

PhoneFeatureFileWriter

public PhoneFeatureFileWriter()
Method Detail

getName

public java.lang.String getName()
Description copied from class: VoiceImportComponent
Get the name of this component

Specified by:
getName in class VoiceImportComponent
Returns:
the name

initialiseComp

public void initialiseComp()
Description copied from class: VoiceImportComponent
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses

Overrides:
initialiseComp in class VoiceImportComponent

getDefaultProps

public java.util.SortedMap getDefaultProps(DatabaseLayout db)
Description copied from class: VoiceImportComponent
Get the map of properties2values containing the default values

Specified by:
getDefaultProps in class VoiceImportComponent
Returns:
map of props2values

setupHelp

protected void setupHelp()
Specified by:
setupHelp in class VoiceImportComponent

compute

public boolean compute()
                throws java.io.IOException,
                       MaryConfigurationException
Description copied from class: VoiceImportComponent
Do the computations required by this component.

Specified by:
compute in class VoiceImportComponent
Returns:
true on success, false on failure
Throws:
java.io.IOException
MaryConfigurationException

writeUnitFeaturesTo

protected void writeUnitFeaturesTo(java.io.DataOutput out)
                            throws java.io.IOException,
                                   java.io.UnsupportedEncodingException,
                                   java.io.FileNotFoundException
Parameters:
out -
Throws:
java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException

writeHeaderTo

protected void writeHeaderTo(java.io.DataOutput out)
                      throws java.io.IOException
Write the header of this feature file to the given DataOutput

Parameters:
out -
Throws:
java.io.IOException

getProgress

public int getProgress()
Provide the progress of computation, in percent, or -1 if that feature is not implemented.

Specified by:
getProgress in class VoiceImportComponent
Returns:
-1 if not implemented, or an integer between 0 and 100.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception