public class CARTBuilder extends VoiceImportComponent
Modifier and Type | Class and Description |
---|---|
static class |
CARTBuilder.WagonCallerThread |
Modifier and Type | Field and Description |
---|---|
String |
ACFEATUREFILE |
String |
CALLWAGON |
String |
CARTFILE |
String |
FEATURESEQFILE |
String |
MAXLEAFSIZE |
String |
MCEPTIMELINE |
String |
NUMPROCESSES |
String |
READFEATURESEQUENCE |
String |
TOPLEVELTREEFILE |
String |
UNITFILE |
bnl, logger, props, props2Help
Constructor and Description |
---|
CARTBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
buildAndDumpDistanceTables(FeatureVector[] featureVectors,
String filename,
FeatureDefinition featDef)
Build the distance tables for the units from which we have the feature vectors and dump them to a file with the given
filename
|
boolean |
compute()
Do the computations required by this component.
|
void |
dumpFeatureVectors(FeatureVector[] featureVectors,
FeatureDefinition featDef,
String filename)
Dump the given feature vectors to a file with the given filename
|
SortedMap<String,String> |
getDefaultProps(DatabaseLayout theDb)
Get the map of properties2values containing the default values
|
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.
|
CART |
importCART(String filename,
FeatureDefinition featDef)
Read in the CARTs from festival/trees/ directory, and store them in a CARTMap
|
protected void |
initialiseComp()
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
|
static void |
main(String[] args) |
boolean |
replaceLeaves(CART cart,
FeatureDefinition featureDefinition)
For each leaf in the CART, run Wagon on the feature vectors in this CART, and replace leaf by resulting CART
|
protected void |
setupHelp() |
getHelpText, getHelpTextForProp, getProp, initialise, setProp
public final String ACFEATUREFILE
public final String FEATURESEQFILE
public final String TOPLEVELTREEFILE
public final String CARTFILE
public final String MCEPTIMELINE
public final String UNITFILE
public final String READFEATURESEQUENCE
public final String MAXLEAFSIZE
public final String CALLWAGON
public final String NUMPROCESSES
public String getName()
VoiceImportComponent
getName
in class VoiceImportComponent
protected void initialiseComp()
VoiceImportComponent
initialiseComp
in class VoiceImportComponent
public SortedMap<String,String> getDefaultProps(DatabaseLayout theDb)
VoiceImportComponent
getDefaultProps
in class VoiceImportComponent
theDb
- dbprotected void setupHelp()
setupHelp
in class VoiceImportComponent
public boolean compute() throws Exception
VoiceImportComponent
compute
in class VoiceImportComponent
Exception
- Exceptionpublic CART importCART(String filename, FeatureDefinition featDef) throws IOException, MaryConfigurationException
filename
- the festvox directory of a voicefeatDef
- featDefIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic boolean replaceLeaves(CART cart, FeatureDefinition featureDefinition) throws IOException, MaryConfigurationException
cart
- the CARTfeatureDefinition
- the definition of the featuresIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic void dumpFeatureVectors(FeatureVector[] featureVectors, FeatureDefinition featDef, String filename) throws FileNotFoundException
featureVectors
- the feature vectorsfeatDef
- the feature definitionfilename
- the filenameFileNotFoundException
- FileNotFoundExceptionpublic void buildAndDumpDistanceTables(FeatureVector[] featureVectors, String filename, FeatureDefinition featDef) throws IOException, MaryConfigurationException
featureVectors
- the feature vectors of the unitsfilename
- the filenamefeatDef
- featDefIOException
- IOExceptionMaryConfigurationException
- MaryConfigurationExceptionpublic int getProgress()
getProgress
in class VoiceImportComponent
Copyright © 2000–2016 DFKI GmbH. All rights reserved.