marytts.tools.voiceimport
Class HTKLabeler

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

public class HTKLabeler
extends VoiceImportComponent

Automatic Labelling using HTK labeller

Author:
Sathish Chandra Pammi

Field Summary
protected  AllophoneSet allophoneSet
           
protected  java.util.Map<java.lang.String,java.util.TreeMap<java.lang.String,java.lang.String>> dictionary
           
 java.lang.String HTDIR
           
 java.lang.String HTKDIR
           
 java.lang.String INTONISEDDIR
           
protected  java.io.File intonisedXMLDir
           
protected  java.lang.String labExt
           
protected  MaryClient mary
           
protected  java.lang.String maryInputType
           
protected  java.lang.String maryOutputType
           
protected  int MAX_ITERATIONS
           
 java.lang.String MAXITER
           
protected  int noIterCompleted
           
 java.lang.String OUTLABDIR
           
protected  int percent
           
 java.lang.String PHONEMEXML
           
protected  int SP_ITERATION
           
 java.lang.String SPITER
           
protected  java.lang.String xmlExt
           
 
Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent
bnl, logger, props, props2Help
 
Constructor Summary
HTKLabeler()
           
 
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
static java.lang.String getMaryXMLHeaderWithInitialBoundary(java.lang.String locale)
          Converting text to RAWMARYXML with 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
 java.lang.String replaceBackTrickyPhones(java.lang.String lab)
          Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training.
 java.lang.String replaceTrickyPhones(java.lang.String lab)
          Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training.
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

xmlExt

protected java.lang.String xmlExt

labExt

protected java.lang.String labExt

mary

protected MaryClient mary

maryInputType

protected java.lang.String maryInputType

maryOutputType

protected java.lang.String maryOutputType

percent

protected int percent

intonisedXMLDir

protected java.io.File intonisedXMLDir

dictionary

protected java.util.Map<java.lang.String,java.util.TreeMap<java.lang.String,java.lang.String>> dictionary

allophoneSet

protected AllophoneSet allophoneSet

MAX_ITERATIONS

protected int MAX_ITERATIONS

SP_ITERATION

protected int SP_ITERATION

noIterCompleted

protected int noIterCompleted

HTDIR

public final java.lang.String HTDIR
See Also:
Constant Field Values

HTKDIR

public final java.lang.String HTKDIR
See Also:
Constant Field Values

OUTLABDIR

public final java.lang.String OUTLABDIR
See Also:
Constant Field Values

MAXITER

public final java.lang.String MAXITER
See Also:
Constant Field Values

INTONISEDDIR

public java.lang.String INTONISEDDIR

PHONEMEXML

public java.lang.String PHONEMEXML

SPITER

public java.lang.String SPITER
Constructor Detail

HTKLabeler

public HTKLabeler()
Method Detail

getName

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

Specified by:
getName in class VoiceImportComponent
Returns:
the name

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

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

compute

public boolean compute()
                throws java.lang.Exception
Do the computations required by this component.

Specified by:
compute in class VoiceImportComponent
Returns:
true on success, false on failure
Throws:
java.lang.Exception

getMaryXMLHeaderWithInitialBoundary

public static java.lang.String getMaryXMLHeaderWithInitialBoundary(java.lang.String locale)
Converting text to RAWMARYXML with Locale

Parameters:
locale -
Returns:

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.

replaceTrickyPhones

public java.lang.String replaceTrickyPhones(java.lang.String lab)
Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training.

Parameters:
lab -
Returns:
String

replaceBackTrickyPhones

public java.lang.String replaceBackTrickyPhones(java.lang.String lab)
Translation table for labels which are incompatible with HTK or shell filenames See common_routines.pl in HTS training. In this function the phones as used internally in HTSEngine are changed back to the Mary TTS set, this function is necessary when correcting the actual durations of AcousticPhonemes.

Parameters:
lab -
Returns:
String