public class UnitSelector extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
beamSize |
protected UnitDatabase |
database |
protected org.apache.log4j.Logger |
logger |
protected float |
sCostWeight |
protected float |
targetCostWeight |
Constructor and Description |
---|
UnitSelector()
Initialise the unit selector.
|
Modifier and Type | Method and Description |
---|---|
protected List<Target> |
createTargets(List<Element> segmentsAndBoundaries)
Create the list of targets from the XML elements to synthesize.
|
static String |
getPhoneSymbol(Element segmentOrBoundary) |
void |
load(UnitDatabase unitDatabase,
float targetCostWeight,
float sCostWeight,
int beamSize) |
void |
load(UnitDatabase unitDatabase,
float targetCostWeight,
int beamSize) |
List<SelectedUnit> |
selectUnits(List<Element> tokensAndBoundaries,
Voice voice)
Select the units for the targets in the given list of tokens and boundaries.
|
protected UnitDatabase database
protected org.apache.log4j.Logger logger
protected float targetCostWeight
protected float sCostWeight
protected int beamSize
public UnitSelector() throws Exception
Exception
- Exceptionload(UnitDatabase unitDatabase, float targetCostWeight, int beamSize)
public void load(UnitDatabase unitDatabase, float targetCostWeight, int beamSize)
public void load(UnitDatabase unitDatabase, float targetCostWeight, float sCostWeight, int beamSize)
public List<SelectedUnit> selectUnits(List<Element> tokensAndBoundaries, Voice voice) throws SynthesisException
tokensAndBoundaries
- the token and boundary MaryXML elements representing an utterance.voice
- the voice with which to synthesizeSynthesisException
- if no path for generating the target utterance could be foundprotected List<Target> createTargets(List<Element> segmentsAndBoundaries)
segmentsAndBoundaries
- a list of MaryXML phone and boundary elementsCopyright © 2000–2016 DFKI GmbH. All rights reserved.