UtteranceProcessor
public class ClusterUnitSelector extends java.lang.Object implements UtteranceProcessor
Constructor | Description |
---|---|
ClusterUnitSelector(java.net.URL url) |
Constructs a ClusterUnitSelector.
|
ClusterUnitSelector(java.net.URL url,
de.dfki.lt.freetts.ClusterUnitNamer unitNamer) |
Constructs a ClusterUnitSelector.
|
Modifier and Type | Method | Description |
---|---|---|
SampleInfo |
getSampleInfo() |
Get the sample info for the underlying database.
|
void |
processUtterance(Utterance utterance) |
Generates the Unit Relation from the Segment Relation.
|
protected void |
setUnitName(Item seg) |
Sets the cluster unit name given the segment.
|
java.lang.String |
toString() |
Retrieves the string representation of this object.
|
public ClusterUnitSelector(java.net.URL url) throws java.io.IOException
url
- the URL for the unit database. If the URL path ends
with a '.bin' it is assumed that the DB is a binary database,
otherwise, its assumed that its a text database1java.io.IOException
- if an error occurs while loading the
databasepublic ClusterUnitSelector(java.net.URL url, de.dfki.lt.freetts.ClusterUnitNamer unitNamer) throws java.io.IOException
url
- the URL for the unit database. If the URL path ends
with a '.bin' it is assumed that the DB is a binary database,
otherwise, its assumed that its a text database1unitNamer
- an optional unit namer, specifying how the cluster
units are called in the voice database referenced by url. If this is null,
an ldom unit naming scheme will be used (e.g., 'ae_afternoon' for the
phoneme 'ae' in the word 'afternoon'.java.io.IOException
- if an error occurs while loading the
databasepublic SampleInfo getSampleInfo()
public void processUtterance(Utterance utterance) throws ProcessException
processUtterance
in interface UtteranceProcessor
utterance
- the utterance to generate the Unit RelationProcessException
- if an IOException is thrown during the
processing of the utteranceprotected void setUnitName(Item seg)
seg
- the segment item that gets the namepublic java.lang.String toString()
toString
in class java.lang.Object