Package com.sun.speech.freetts.diphone
Class DiphoneUnitSelector
- java.lang.Object
-
- com.sun.speech.freetts.diphone.DiphoneUnitSelector
-
- All Implemented Interfaces:
UtteranceProcessor
public class DiphoneUnitSelector extends java.lang.Object implements UtteranceProcessor
Generates the Unit Relation of an Utterance from the Segment Relation.
-
-
Constructor Summary
Constructors Constructor Description DiphoneUnitSelector(java.net.URL url)Constructs a DiphoneUnitSelector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SampleInfogetSampleInfo()Get the sample info for the underlying database.voidprocessUtterance(Utterance utterance)Generates the Unit Relation from the Segment Relation.java.lang.StringtoString()Returns a string representation of this object.
-
-
-
Constructor Detail
-
DiphoneUnitSelector
public DiphoneUnitSelector(java.net.URL url) throws java.io.IOExceptionConstructs a DiphoneUnitSelector.- Parameters:
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 database1- Throws:
java.io.IOException- if an error occurs while loading the database
-
-
Method Detail
-
getSampleInfo
public SampleInfo getSampleInfo()
Get the sample info for the underlying database.- Returns:
- the sample info object
-
processUtterance
public void processUtterance(Utterance utterance) throws ProcessException
Generates the Unit Relation from the Segment Relation.- Specified by:
processUtterancein interfaceUtteranceProcessor- Parameters:
utterance- the utterance to generate the Unit Relation- Throws:
ProcessException- if an IOException is thrown during the processing of the utterance
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this object
-
-