marytts.tools.voiceimport
Class UnknownWordsFrequencyComputer

java.lang.Object
  extended by marytts.tools.voiceimport.VoiceImportComponent
      extended by marytts.tools.voiceimport.UnknownWordsFrequencyComputer

public class UnknownWordsFrequencyComputer
extends VoiceImportComponent

For the given texts, compute unit features and align them with the given unit labels.

Author:
schroed

Field Summary
protected  DatabaseLayout db
           
protected  java.lang.String featsExt
           
 java.lang.String FEATUREDIR
           
protected  java.lang.String locale
           
protected  MaryClient mary
           
protected  java.lang.String maryInputType
           
protected  java.lang.String maryOutputType
           
 java.lang.String MARYSERVERHOST
           
 java.lang.String MARYSERVERPORT
           
protected  int percent
           
protected  java.io.File textDir
           
protected  java.io.File unitfeatureDir
           
 
Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent
bnl, logger, props, props2Help
 
Constructor Summary
UnknownWordsFrequencyComputer()
           
 
Method Summary
 boolean compute()
          Do the computations required by this component.
 void computeFeaturesFor(java.lang.String basename)
           
 java.util.SortedMap getDefaultProps(DatabaseLayout db)
          Get the map of properties2values containing the default values
 MaryClient getMaryClient()
           
static java.lang.String getMaryXMLHeaderWithInitialBoundary(java.lang.String locale)
           
 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
protected  void setupHelp()
           
 
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

textDir

protected java.io.File textDir

unitfeatureDir

protected java.io.File unitfeatureDir

featsExt

protected java.lang.String featsExt

locale

protected java.lang.String locale

mary

protected MaryClient mary

maryInputType

protected java.lang.String maryInputType

maryOutputType

protected java.lang.String maryOutputType

db

protected DatabaseLayout db

percent

protected int percent

FEATUREDIR

public java.lang.String FEATUREDIR

MARYSERVERHOST

public java.lang.String MARYSERVERHOST

MARYSERVERPORT

public java.lang.String MARYSERVERPORT
Constructor Detail

UnknownWordsFrequencyComputer

public UnknownWordsFrequencyComputer()
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

getMaryXMLHeaderWithInitialBoundary

public static java.lang.String getMaryXMLHeaderWithInitialBoundary(java.lang.String locale)

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

getMaryClient

public MaryClient getMaryClient()
                         throws java.io.IOException
Throws:
java.io.IOException

compute

public boolean compute()
                throws java.io.IOException,
                       java.lang.Exception
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
java.lang.Exception

computeFeaturesFor

public void computeFeaturesFor(java.lang.String basename)
                        throws java.io.IOException,
                               java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

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.