public class PhoneUnitLabelComputer extends VoiceImportComponent
| Modifier and Type | Field and Description |
|---|---|
protected int |
basenameIndex |
protected DatabaseLayout |
db |
protected String |
pauseSymbol |
protected int |
percent |
protected File |
phonelabelDir |
protected File |
unitlabelDir |
protected String |
unitlabelExt |
bnl, logger, props, props2Help| Constructor and Description |
|---|
PhoneUnitLabelComputer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compute()
Do the computations required by this component.
|
void |
computePhoneLabel(String baseName) |
SortedMap<String,String> |
getDefaultProps(DatabaseLayout db)
Get the map of properties2values containing the default values
|
protected List<Double> |
getMidTimes(List<String> labels,
List<Double> endTimes)
Get mid points for an utterance, given a list its phone labels and a list of corresponding end points.
|
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.
|
protected void |
initialiseComp()
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
|
protected void |
setupHelp() |
protected String[] |
toUnitLabels(List<String> labels,
List<Double> endTimes,
List<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 String[] |
toUnitLabels(String[] phoneLabels)
Deprecated.
|
getHelpText, getHelpTextForProp, getProp, initialise, setPropprotected File phonelabelDir
protected File unitlabelDir
protected String unitlabelExt
protected String pauseSymbol
protected DatabaseLayout db
protected int percent
protected int basenameIndex
public String getName()
VoiceImportComponentgetName in class VoiceImportComponentprotected void initialiseComp()
throws Exception
VoiceImportComponentinitialiseComp in class VoiceImportComponentException - Exceptionpublic SortedMap<String,String> getDefaultProps(DatabaseLayout db)
VoiceImportComponentgetDefaultProps in class VoiceImportComponentdb - dbprotected void setupHelp()
setupHelp in class VoiceImportComponentpublic boolean compute()
throws Exception
VoiceImportComponentcompute in class VoiceImportComponentException - Exceptionprotected List<Double> getMidTimes(List<String> labels, List<Double> endTimes)
labels - of the phonesendTimes - of the phones@Deprecated protected String[] toUnitLabels(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 String[] toUnitLabels(List<String> labels, List<Double> endTimes, List<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 VoiceImportComponentCopyright © 2000–2016 DFKI GmbH. All rights reserved.