1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:30 CET 2009 -->
\r
7 ClusterUnitSelector (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.clunits.ClusterUnitSelector class">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 parent.document.title="ClusterUnitSelector (FreeTTS 1.2)";
\r
23 <BODY BGCOLOR="white" onload="windowTitle();">
\r
26 <!-- ========= START OF TOP NAVBAR ======= -->
\r
27 <A NAME="navbar_top"><!-- --></A>
28 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
31 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
32 <A NAME="navbar_top_firstrow"><!-- --></A>
33 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
34 <TR ALIGN="center" VALIGN="top">
\r
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
52 <A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitPitchmarkGenerator.html" title="class in com.sun.speech.freetts.clunits"><B>PREV CLASS</B></A>
\r
53 NEXT CLASS</FONT></TD>
\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
56 <A HREF="ClusterUnitSelector.html" target="_top"><B>NO FRAMES</B></A>
\r
57 <SCRIPT type="text/javascript">
\r
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
72 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
74 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->
\r
81 <!-- ======== START OF CLASS DATA ======== -->
\r
84 com.sun.speech.freetts.clunits</FONT>
\r
86 Class ClusterUnitSelector</H2>
\r
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.clunits.ClusterUnitSelector</B>
\r
92 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../com/sun/speech/freetts/UtteranceProcessor.html" title="interface in com.sun.speech.freetts">UtteranceProcessor</A></DD>
\r
96 <DT>public class <B>ClusterUnitSelector</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../com/sun/speech/freetts/UtteranceProcessor.html" title="interface in com.sun.speech.freetts">UtteranceProcessor</A></DL>
\r
99 Generates the Unit Relation of an Utterance from the
107 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
110 <!-- =========== FIELD SUMMARY =========== -->
\r
113 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
115 <A NAME="constructor_summary"><!-- --></A>
116 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
117 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
118 <TD COLSPAN=2><FONT SIZE="+2">
\r
119 <B>Constructor Summary</B></FONT></TD>
\r
121 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
122 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#ClusterUnitSelector(java.net.URL)">ClusterUnitSelector</A></B>(java.net.URL url)</CODE>
\r
125 Constructs a ClusterUnitSelector.</TD>
\r
127 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
128 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#ClusterUnitSelector(java.net.URL, de.dfki.lt.freetts.ClusterUnitNamer)">ClusterUnitSelector</A></B>(java.net.URL url,
129 de.dfki.lt.freetts.ClusterUnitNamer unitNamer)</CODE>
\r
132 Constructs a ClusterUnitSelector.</TD>
\r
136 <!-- ========== METHOD SUMMARY =========== -->
\r
138 <A NAME="method_summary"><!-- --></A>
139 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
140 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
141 <TD COLSPAN=2><FONT SIZE="+2">
\r
142 <B>Method Summary</B></FONT></TD>
\r
144 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
145 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
146 <CODE> <A HREF="../../../../../com/sun/speech/freetts/relp/SampleInfo.html" title="class in com.sun.speech.freetts.relp">SampleInfo</A></CODE></FONT></TD>
\r
147 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#getSampleInfo()">getSampleInfo</A></B>()</CODE>
\r
150 Get the sample info for the underlying database.</TD>
\r
152 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
153 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
154 <CODE> void</CODE></FONT></TD>
\r
155 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#processUtterance(com.sun.speech.freetts.Utterance)">processUtterance</A></B>(<A HREF="../../../../../com/sun/speech/freetts/Utterance.html" title="class in com.sun.speech.freetts">Utterance</A> utterance)</CODE>
\r
158 Generates the Unit Relation from the Segment Relation.
161 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
162 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
163 <CODE>protected void</CODE></FONT></TD>
\r
164 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#setUnitName(com.sun.speech.freetts.Item)">setUnitName</A></B>(<A HREF="../../../../../com/sun/speech/freetts/Item.html" title="class in com.sun.speech.freetts">Item</A> seg)</CODE>
\r
167 Sets the cluster unit name given the segment.</TD>
\r
169 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
171 <CODE> java.lang.String</CODE></FONT></TD>
\r
172 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitSelector.html#toString()">toString</A></B>()</CODE>
\r
175 Retrieves the string representation of this object.</TD>
\r
178 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
179 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
180 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
181 <TD><B>Methods inherited from class java.lang.Object</B></TD>
\r
183 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
184 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
\r
190 <!-- ============ FIELD DETAIL =========== -->
\r
193 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
195 <A NAME="constructor_detail"><!-- --></A>
196 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
197 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
198 <TD COLSPAN=1><FONT SIZE="+2">
\r
199 <B>Constructor Detail</B></FONT></TD>
\r
203 <A NAME="ClusterUnitSelector(java.net.URL)"><!-- --></A><H3>
\r
204 ClusterUnitSelector</H3>
\r
206 public <B>ClusterUnitSelector</B>(java.net.URL url)
207 throws java.io.IOException</PRE>
\r
209 <DD>Constructs a ClusterUnitSelector.
\r
211 <DT><B>Parameters:</B><DD><CODE>url</CODE> - the URL for the unit database. If the URL path ends
212 with a '.bin' it is assumed that the DB is a binary database,
213 otherwise, its assumed that its a text database1
215 <DD><CODE>java.io.IOException</CODE> - if an error occurs while loading the
219 <A NAME="ClusterUnitSelector(java.net.URL, de.dfki.lt.freetts.ClusterUnitNamer)"><!-- --></A><H3>
\r
220 ClusterUnitSelector</H3>
\r
222 public <B>ClusterUnitSelector</B>(java.net.URL url,
223 de.dfki.lt.freetts.ClusterUnitNamer unitNamer)
224 throws java.io.IOException</PRE>
\r
226 <DD>Constructs a ClusterUnitSelector.
\r
228 <DT><B>Parameters:</B><DD><CODE>url</CODE> - the URL for the unit database. If the URL path ends
229 with a '.bin' it is assumed that the DB is a binary database,
230 otherwise, its assumed that its a text database1<DD><CODE>unitNamer</CODE> - an optional unit namer, specifying how the cluster
231 units are called in the voice database referenced by url. If this is null,
232 an ldom unit naming scheme will be used (e.g., 'ae_afternoon' for the
233 phoneme 'ae' in the word 'afternoon'.
235 <DD><CODE>java.io.IOException</CODE> - if an error occurs while loading the
238 <!-- ============ METHOD DETAIL ========== -->
\r
240 <A NAME="method_detail"><!-- --></A>
241 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
242 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
243 <TD COLSPAN=1><FONT SIZE="+2">
\r
244 <B>Method Detail</B></FONT></TD>
\r
248 <A NAME="getSampleInfo()"><!-- --></A><H3>
\r
251 public <A HREF="../../../../../com/sun/speech/freetts/relp/SampleInfo.html" title="class in com.sun.speech.freetts.relp">SampleInfo</A> <B>getSampleInfo</B>()</PRE>
\r
253 <DD>Get the sample info for the underlying database.
\r
260 <DT><B>Returns:</B><DD>the sample info object</DL>
\r
265 <A NAME="processUtterance(com.sun.speech.freetts.Utterance)"><!-- --></A><H3>
\r
266 processUtterance</H3>
\r
268 public void <B>processUtterance</B>(<A HREF="../../../../../com/sun/speech/freetts/Utterance.html" title="class in com.sun.speech.freetts">Utterance</A> utterance)
269 throws <A HREF="../../../../../com/sun/speech/freetts/ProcessException.html" title="class in com.sun.speech.freetts">ProcessException</A></PRE>
\r
271 <DD>Generates the Unit Relation from the Segment Relation.
272 <br><b>Implementation note:</b><br>
273 Populates the segment relation with segment names of the form:
274 XX_YY where XX is the segment name (typically a phoneme)
275 and YY is the word that the segment is in (stripped and
278 The first step in cluster unit selection is to determine the unit
279 type for each unit in the utterance. The unit type for
280 selection in the simple talking clock example (cmu_time_awb) is
281 done per phone. The unit type consists of the phone
282 name followed by the word the phone comes from (e.g., n_now for
283 the phone 'n' in the word 'now').
285 Invoke the Viterbi algorithm (via a viterbi class) that
286 selects the proper units for the segment and adds that to
289 For each segment, create a unit and attach features based
290 upon the selected units.
\r
293 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/sun/speech/freetts/UtteranceProcessor.html#processUtterance(com.sun.speech.freetts.Utterance)">processUtterance</A></CODE> in interface <CODE><A HREF="../../../../../com/sun/speech/freetts/UtteranceProcessor.html" title="interface in com.sun.speech.freetts">UtteranceProcessor</A></CODE></DL>
\r
296 <DT><B>Parameters:</B><DD><CODE>utterance</CODE> - the utterance to generate the Unit Relation
298 <DD><CODE><A HREF="../../../../../com/sun/speech/freetts/ProcessException.html" title="class in com.sun.speech.freetts">ProcessException</A></CODE> - if an IOException is thrown during the
299 processing of the utterance</DL>
\r
304 <A NAME="setUnitName(com.sun.speech.freetts.Item)"><!-- --></A><H3>
\r
307 protected void <B>setUnitName</B>(<A HREF="../../../../../com/sun/speech/freetts/Item.html" title="class in com.sun.speech.freetts">Item</A> seg)</PRE>
\r
309 <DD>Sets the cluster unit name given the segment.
\r
315 <DT><B>Parameters:</B><DD><CODE>seg</CODE> - the segment item that gets the name</DL>
\r
320 <A NAME="toString()"><!-- --></A><H3>
\r
323 public java.lang.String <B>toString</B>()</PRE>
\r
325 <DD>Retrieves the string representation of this object.
\r
332 <DT><B>Returns:</B><DD>the string representation of this object</DL>
\r
335 <!-- ========= END OF CLASS DATA ========= -->
\r
339 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
340 <A NAME="navbar_bottom"><!-- --></A>
341 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
342 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
344 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
345 <A NAME="navbar_bottom_firstrow"><!-- --></A>
346 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
347 <TR ALIGN="center" VALIGN="top">
\r
348 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
349 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
350 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
351 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
352 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
353 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
354 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
358 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
364 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
365 <A HREF="../../../../../com/sun/speech/freetts/clunits/ClusterUnitPitchmarkGenerator.html" title="class in com.sun.speech.freetts.clunits"><B>PREV CLASS</B></A>
\r
366 NEXT CLASS</FONT></TD>
\r
367 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
368 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
369 <A HREF="ClusterUnitSelector.html" target="_top"><B>NO FRAMES</B></A>
\r
370 <SCRIPT type="text/javascript">
\r
373 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
378 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
384 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
385 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
386 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
387 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
390 <A NAME="skip-navbar_bottom"></A>
391 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r