|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarytts.tools.voiceimport.VoiceImportComponent
marytts.tools.voiceimport.PhoneUnitLabelComputer
public class PhoneUnitLabelComputer
Compute unit labels from phone labels.
| Field Summary | |
|---|---|
protected int |
basenameIndex
|
protected DatabaseLayout |
db
|
java.lang.String |
LABELDIR
|
protected java.lang.String |
pauseSymbol
|
protected int |
percent
|
protected java.io.File |
phonelabelDir
|
protected java.io.File |
unitlabelDir
|
protected java.lang.String |
unitlabelExt
|
| Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent |
|---|
bnl, logger, props, props2Help |
| Constructor Summary | |
|---|---|
PhoneUnitLabelComputer()
|
|
| Method Summary | |
|---|---|
boolean |
compute()
Do the computations required by this component. |
void |
computePhoneLabel(java.lang.String baseName)
|
java.util.SortedMap |
getDefaultProps(DatabaseLayout db)
Get the map of properties2values containing the default values |
protected java.util.List<java.lang.Double> |
getMidTimes(java.util.List<java.lang.String> labels,
java.util.List<java.lang.Double> endTimes)
Get mid points for an utterance, given a list its phone labels and a list of corresponding end points. |
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()
|
protected java.lang.String[] |
toUnitLabels(java.util.List<java.lang.String> labels,
java.util.List<java.lang.Double> endTimes,
java.util.List<java.lang.Double> midTimes)
Generate a sequence of Strings, corresponding to the lines in an Xwaves-compatible label file, by interleaving a List of label Strings with a List of end time points. |
protected java.lang.String[] |
toUnitLabels(java.lang.String[] phoneLabels)
Deprecated. |
| 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 |
|---|
protected java.io.File phonelabelDir
protected java.io.File unitlabelDir
protected java.lang.String pauseSymbol
protected java.lang.String unitlabelExt
protected DatabaseLayout db
protected int percent
protected int basenameIndex
public java.lang.String LABELDIR
| Constructor Detail |
|---|
public PhoneUnitLabelComputer()
| Method Detail |
|---|
public java.lang.String getName()
VoiceImportComponent
getName in class VoiceImportComponentpublic void initialiseComp()
VoiceImportComponent
initialiseComp in class VoiceImportComponentpublic java.util.SortedMap getDefaultProps(DatabaseLayout db)
VoiceImportComponent
getDefaultProps in class VoiceImportComponentprotected void setupHelp()
setupHelp in class VoiceImportComponent
public boolean compute()
throws java.lang.Exception
VoiceImportComponent
compute in class VoiceImportComponentjava.lang.Exception
public void computePhoneLabel(java.lang.String baseName)
throws java.lang.Exception
java.lang.Exception
protected java.util.List<java.lang.Double> getMidTimes(java.util.List<java.lang.String> labels,
java.util.List<java.lang.Double> endTimes)
labels - of the phonesendTimes - of the phones
@Deprecated protected java.lang.String[] toUnitLabels(java.lang.String[] phoneLabels)
phoneLabels - the phone labels, one phone per line, with each
line containing three fields: 1. the end time of the current phone,
in seconds, since the beginning of the file; 2. a number to be ignored;
3. the phone symbol.
protected java.lang.String[] toUnitLabels(java.util.List<java.lang.String> labels,
java.util.List<java.lang.Double> endTimes,
java.util.List<java.lang.Double> midTimes)
labels - a List of label StringsendTimes - a List of time points representing the end points of these labelsmidTimes - a List of time points representing the mid points of these labels (can be null)
public int getProgress()
getProgress in class VoiceImportComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||