upstream version 1.2.2
[debian/freetts] / javadoc / com / sun / speech / freetts / diphone / Diphone.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
2 <!--NewPage-->\r
3 <HTML>\r
4 <HEAD>\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:30 CET 2009 -->\r
6 <TITLE>\r
7 Diphone (FreeTTS 1.2)\r
8 </TITLE>\r
9 \r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.diphone.Diphone class">\r
11 \r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">\r
13 \r
14 <SCRIPT type="text/javascript">\r
15 function windowTitle()\r
16 {\r
17     parent.document.title="Diphone (FreeTTS 1.2)";\r
18 }\r
19 </SCRIPT>\r
20 \r
21 </HEAD>\r
22 \r
23 <BODY BGCOLOR="white" onload="windowTitle();">\r
24 \r
25
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
30 <TR>\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>&nbsp;</TD>\r
36   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
37   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
39   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
42   </TR>\r
43 </TABLE>\r
44 </TD>\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
46 </EM>\r
47 </TD>\r
48 </TR>\r
49 \r
50 <TR>\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
52 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/AliasDiphone.html" title="class in com.sun.speech.freetts.diphone"><B>PREV CLASS</B></A>&nbsp;\r
53 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/DiphonePitchmarkGenerator.html" title="class in com.sun.speech.freetts.diphone"><B>NEXT CLASS</B></A></FONT></TD>\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
55   <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
56 &nbsp;<A HREF="Diphone.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
57 &nbsp;<SCRIPT type="text/javascript">\r
58   <!--\r
59   if(window==top) {\r
60     document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
61   }\r
62   //-->\r
63 </SCRIPT>\r
64 <NOSCRIPT>\r
65   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>\r
66 </NOSCRIPT>
67 \r
68 </FONT></TD>\r
69 </TR>\r
70 <TR>\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
72   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
74 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
75 </TR>\r
76 </TABLE>\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->\r
79 \r
80 <HR>\r
81 <!-- ======== START OF CLASS DATA ======== -->\r
82 <H2>\r
83 <FONT SIZE="-1">\r
84 com.sun.speech.freetts.diphone</FONT>\r
85 <BR>\r
86 Class Diphone</H2>\r
87 <PRE>\r
88 java.lang.Object\r
89   <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.diphone.Diphone</B>\r
90 </PRE>\r
91 <DL>\r
92 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../com/sun/speech/freetts/diphone/AliasDiphone.html" title="class in com.sun.speech.freetts.diphone">AliasDiphone</A></DD>\r
93 </DL>\r
94 <HR>\r
95 <DL>\r
96 <DT>public class <B>Diphone</B><DT>extends java.lang.Object</DL>\r
97 \r
98 <P>\r
99 Represents two adjacent phones. A diphone is defined by its name,
100  the set of audio data, and information used to help stitch diphones
101  together. This class is immutable.\r
102 <P>\r
103 \r
104 <P>\r
105 <HR>\r
106 \r
107 <P>\r
108 <!-- ======== NESTED CLASS SUMMARY ======== -->\r
109 \r
110 \r
111 <!-- =========== FIELD SUMMARY =========== -->\r
112 \r
113 <A NAME="field_summary"><!-- --></A>
114 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
115 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
116 <TD COLSPAN=2><FONT SIZE="+2">\r
117 <B>Field Summary</B></FONT></TD>\r
118 </TR>\r
119 <TR BGCOLOR="white" CLASS="TableRowColor">\r
120 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
121 <CODE>protected static&nbsp;int</CODE></FONT></TD>\r
122 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#ALIAS_MAGIC">ALIAS_MAGIC</A></B></CODE>\r
123 \r
124 <BR>\r
125 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\r
126 </TR>\r
127 <TR BGCOLOR="white" CLASS="TableRowColor">\r
128 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
129 <CODE>protected static&nbsp;int</CODE></FONT></TD>\r
130 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#MAGIC">MAGIC</A></B></CODE>\r
131 \r
132 <BR>\r
133 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\r
134 </TR>\r
135 <TR BGCOLOR="white" CLASS="TableRowColor">\r
136 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
137 <CODE>protected static&nbsp;int</CODE></FONT></TD>\r
138 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#NAME_LENGTH">NAME_LENGTH</A></B></CODE>\r
139 \r
140 <BR>\r
141 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\r
142 </TR>\r
143 </TABLE>\r
144 &nbsp;\r
145 <!-- ======== CONSTRUCTOR SUMMARY ======== -->\r
146 \r
147 <A NAME="constructor_summary"><!-- --></A>
148 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
149 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
150 <TD COLSPAN=2><FONT SIZE="+2">\r
151 <B>Constructor Summary</B></FONT></TD>\r
152 </TR>\r
153 <TR BGCOLOR="white" CLASS="TableRowColor">\r
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
155 <CODE>protected </CODE></FONT></TD>\r
156 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#Diphone(java.lang.String)">Diphone</A></B>(java.lang.String&nbsp;name)</CODE>\r
157 \r
158 <BR>\r
159 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor to be used only by subclasses who do not use the
160  variables except for the name</TD>\r
161 </TR>\r
162 <TR BGCOLOR="white" CLASS="TableRowColor">\r
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
164 <CODE>&nbsp;</CODE></FONT></TD>\r
165 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#Diphone(java.lang.String, com.sun.speech.freetts.relp.Sample[], int)">Diphone</A></B>(java.lang.String&nbsp;name,
166         <A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A>[]&nbsp;samples,
167         int&nbsp;midPoint)</CODE>\r
168 \r
169 <BR>\r
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a diphone with the given name, samples and midpoint.</TD>\r
171 </TR>\r
172 </TABLE>\r
173 &nbsp;\r
174 <!-- ========== METHOD SUMMARY =========== -->\r
175 \r
176 <A NAME="method_summary"><!-- --></A>
177 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
178 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
179 <TD COLSPAN=2><FONT SIZE="+2">\r
180 <B>Method Summary</B></FONT></TD>\r
181 </TR>\r
182 <TR BGCOLOR="white" CLASS="TableRowColor">\r
183 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
184 <CODE>&nbsp;void</CODE></FONT></TD>\r
185 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#dump()">dump</A></B>()</CODE>\r
186 \r
187 <BR>\r
188 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dumps out this Diphone.</TD>\r
189 </TR>\r
190 <TR BGCOLOR="white" CLASS="TableRowColor">\r
191 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
192 <CODE>&nbsp;void</CODE></FONT></TD>\r
193 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#dumpBinary(java.nio.ByteBuffer)">dumpBinary</A></B>(java.nio.ByteBuffer&nbsp;bb)</CODE>\r
194 \r
195 <BR>\r
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dumps the diphone to the given channel.</TD>\r
197 </TR>\r
198 <TR BGCOLOR="white" CLASS="TableRowColor">\r
199 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
200 <CODE>&nbsp;void</CODE></FONT></TD>\r
201 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#dumpBinary(java.io.DataOutputStream)">dumpBinary</A></B>(java.io.DataOutputStream&nbsp;os)</CODE>\r
202 \r
203 <BR>\r
204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dumps the diphone to the given channel.</TD>\r
205 </TR>\r
206 <TR BGCOLOR="white" CLASS="TableRowColor">\r
207 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
208 <CODE>&nbsp;int</CODE></FONT></TD>\r
209 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getMidPoint()">getMidPoint</A></B>()</CODE>\r
210 \r
211 <BR>\r
212 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the midpoint index. the midpoint index is the sample
213  that divides the diphone into the first and second parts.</TD>\r
214 </TR>\r
215 <TR BGCOLOR="white" CLASS="TableRowColor">\r
216 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
217 <CODE>&nbsp;java.lang.String</CODE></FONT></TD>\r
218 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getName()">getName</A></B>()</CODE>\r
219 \r
220 <BR>\r
221 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of the diphone.</TD>\r
222 </TR>\r
223 <TR BGCOLOR="white" CLASS="TableRowColor">\r
224 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
225 <CODE>&nbsp;int</CODE></FONT></TD>\r
226 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getPbPositionMillis()">getPbPositionMillis</A></B>()</CODE>\r
227 \r
228 <BR>\r
229 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the midpoint index. the midpoint index is the sample
230  that divides the diphone into the first and second parts.</TD>\r
231 </TR>\r
232 <TR BGCOLOR="white" CLASS="TableRowColor">\r
233 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
234 <CODE>&nbsp;<A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A>[]</CODE></FONT></TD>\r
235 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getSamples()">getSamples</A></B>()</CODE>\r
236 \r
237 <BR>\r
238 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the samples associated with this diphone.</TD>\r
239 </TR>\r
240 <TR BGCOLOR="white" CLASS="TableRowColor">\r
241 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
242 <CODE>&nbsp;<A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A></CODE></FONT></TD>\r
243 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getSamples(int)">getSamples</A></B>(int&nbsp;which)</CODE>\r
244 \r
245 <BR>\r
246 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a particular sample.</TD>\r
247 </TR>\r
248 <TR BGCOLOR="white" CLASS="TableRowColor">\r
249 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
250 <CODE>&nbsp;int</CODE></FONT></TD>\r
251 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#getUnitSize(int)">getUnitSize</A></B>(int&nbsp;unitPart)</CODE>\r
252 \r
253 <BR>\r
254 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the total number of residuals in the given part for this
255  diphone.</TD>\r
256 </TR>\r
257 <TR BGCOLOR="white" CLASS="TableRowColor">\r
258 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
259 <CODE>static&nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html" title="class in com.sun.speech.freetts.diphone">Diphone</A></CODE></FONT></TD>\r
260 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#loadBinary(java.nio.ByteBuffer)">loadBinary</A></B>(java.nio.ByteBuffer&nbsp;bb)</CODE>\r
261 \r
262 <BR>\r
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a new diphone from  the given buffer.</TD>\r
264 </TR>\r
265 <TR BGCOLOR="white" CLASS="TableRowColor">\r
266 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
267 <CODE>static&nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html" title="class in com.sun.speech.freetts.diphone">Diphone</A></CODE></FONT></TD>\r
268 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#loadBinary(java.io.DataInputStream)">loadBinary</A></B>(java.io.DataInputStream&nbsp;dis)</CODE>\r
269 \r
270 <BR>\r
271 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a new  diphone from  the given DataInputStream.</TD>\r
272 </TR>\r
273 <TR BGCOLOR="white" CLASS="TableRowColor">\r
274 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
275 <CODE>&nbsp;<A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A></CODE></FONT></TD>\r
276 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html#nearestSample(float, int)">nearestSample</A></B>(float&nbsp;uIndex,
277               int&nbsp;unitPart)</CODE>\r
278 \r
279 <BR>\r
280 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sample that is closest to uIndex.</TD>\r
281 </TR>\r
282 </TABLE>\r
283 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
284 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
285 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">\r
286 <TD><B>Methods inherited from class java.lang.Object</B></TD>\r
287 </TR>\r
288 <TR BGCOLOR="white" CLASS="TableRowColor">\r
289 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>\r
290 </TR>\r
291 </TABLE>\r
292 &nbsp;\r
293 <P>\r
294 \r
295 <!-- ============ FIELD DETAIL =========== -->\r
296 \r
297 <A NAME="field_detail"><!-- --></A>
298 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
299 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
300 <TD COLSPAN=1><FONT SIZE="+2">\r
301 <B>Field Detail</B></FONT></TD>\r
302 </TR>\r
303 </TABLE>\r
304 \r
305 <A NAME="MAGIC"><!-- --></A><H3>\r
306 MAGIC</H3>\r
307 <PRE>\r
308 protected static final int <B>MAGIC</B></PRE>\r
309 <DL>\r
310 <DL>\r
311 <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.sun.speech.freetts.diphone.Diphone.MAGIC">Constant Field Values</A></DL>\r
312 </DL>\r
313 <HR>\r
314 \r
315 <A NAME="ALIAS_MAGIC"><!-- --></A><H3>\r
316 ALIAS_MAGIC</H3>\r
317 <PRE>\r
318 protected static final int <B>ALIAS_MAGIC</B></PRE>\r
319 <DL>\r
320 <DL>\r
321 <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.sun.speech.freetts.diphone.Diphone.ALIAS_MAGIC">Constant Field Values</A></DL>\r
322 </DL>\r
323 <HR>\r
324 \r
325 <A NAME="NAME_LENGTH"><!-- --></A><H3>\r
326 NAME_LENGTH</H3>\r
327 <PRE>\r
328 protected static final int <B>NAME_LENGTH</B></PRE>\r
329 <DL>\r
330 <DL>\r
331 <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.sun.speech.freetts.diphone.Diphone.NAME_LENGTH">Constant Field Values</A></DL>\r
332 </DL>\r
333 \r
334 <!-- ========= CONSTRUCTOR DETAIL ======== -->\r
335 \r
336 <A NAME="constructor_detail"><!-- --></A>
337 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
338 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
339 <TD COLSPAN=1><FONT SIZE="+2">\r
340 <B>Constructor Detail</B></FONT></TD>\r
341 </TR>\r
342 </TABLE>\r
343 \r
344 <A NAME="Diphone(java.lang.String, com.sun.speech.freetts.relp.Sample[], int)"><!-- --></A><H3>\r
345 Diphone</H3>\r
346 <PRE>\r
347 public <B>Diphone</B>(java.lang.String&nbsp;name,
348                <A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A>[]&nbsp;samples,
349                int&nbsp;midPoint)</PRE>\r
350 <DL>\r
351 <DD>Creates a diphone with the given name, samples and midpoint.\r
352 <P>\r
353 <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the diphone<DD><CODE>samples</CODE> - the set of samples for the diphone<DD><CODE>midPoint</CODE> - the index of the sample midpoint</DL>\r
354 <HR>\r
355 \r
356 <A NAME="Diphone(java.lang.String)"><!-- --></A><H3>\r
357 Diphone</H3>\r
358 <PRE>\r
359 protected <B>Diphone</B>(java.lang.String&nbsp;name)</PRE>\r
360 <DL>\r
361 <DD>Constructor to be used only by subclasses who do not use the
362  variables except for the name\r
363 <P>\r
364 <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the diphone</DL>\r
365 \r
366 <!-- ============ METHOD DETAIL ========== -->\r
367 \r
368 <A NAME="method_detail"><!-- --></A>
369 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
370 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">\r
371 <TD COLSPAN=1><FONT SIZE="+2">\r
372 <B>Method Detail</B></FONT></TD>\r
373 </TR>\r
374 </TABLE>\r
375 \r
376 <A NAME="getSamples()"><!-- --></A><H3>\r
377 getSamples</H3>\r
378 <PRE>\r
379 public <A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A>[] <B>getSamples</B>()</PRE>\r
380 <DL>\r
381 <DD>Returns the samples associated with this diphone.\r
382 <P>\r
383 <DD><DL>\r
384
385 <DT><B>Returns:</B><DD>the samples associated with this diphone</DL>\r
386 </DD>\r
387 </DL>\r
388 <HR>\r
389 \r
390 <A NAME="getSamples(int)"><!-- --></A><H3>\r
391 getSamples</H3>\r
392 <PRE>\r
393 public <A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A> <B>getSamples</B>(int&nbsp;which)</PRE>\r
394 <DL>\r
395 <DD>Returns a particular sample.\r
396 <P>\r
397 <DD><DL>\r
398 <DT><B>Parameters:</B><DD><CODE>which</CODE> - which sample to return
399 <DT><B>Returns:</B><DD>the desired sample</DL>\r
400 </DD>\r
401 </DL>\r
402 <HR>\r
403 \r
404 <A NAME="getName()"><!-- --></A><H3>\r
405 getName</H3>\r
406 <PRE>\r
407 public java.lang.String <B>getName</B>()</PRE>\r
408 <DL>\r
409 <DD>Gets the name of the diphone.\r
410 <P>\r
411 <DD><DL>\r
412
413 <DT><B>Returns:</B><DD>the name of the diphone</DL>\r
414 </DD>\r
415 </DL>\r
416 <HR>\r
417 \r
418 <A NAME="getMidPoint()"><!-- --></A><H3>\r
419 getMidPoint</H3>\r
420 <PRE>\r
421 public int <B>getMidPoint</B>()</PRE>\r
422 <DL>\r
423 <DD>Returns the midpoint index. the midpoint index is the sample
424  that divides the diphone into the first and second parts.\r
425 <P>\r
426 <DD><DL>\r
427
428 <DT><B>Returns:</B><DD>the midpoint index.</DL>\r
429 </DD>\r
430 </DL>\r
431 <HR>\r
432 \r
433 <A NAME="getPbPositionMillis()"><!-- --></A><H3>\r
434 getPbPositionMillis</H3>\r
435 <PRE>\r
436 public int <B>getPbPositionMillis</B>()</PRE>\r
437 <DL>\r
438 <DD>Returns the midpoint index. the midpoint index is the sample
439  that divides the diphone into the first and second parts.\r
440 <P>\r
441 <DD><DL>\r
442
443 <DT><B>Returns:</B><DD>the midpoint index.</DL>\r
444 </DD>\r
445 </DL>\r
446 <HR>\r
447 \r
448 <A NAME="nearestSample(float, int)"><!-- --></A><H3>\r
449 nearestSample</H3>\r
450 <PRE>\r
451 public <A HREF="../../../../../com/sun/speech/freetts/relp/Sample.html" title="class in com.sun.speech.freetts.relp">Sample</A> <B>nearestSample</B>(float&nbsp;uIndex,
452                             int&nbsp;unitPart)</PRE>\r
453 <DL>\r
454 <DD>Returns the sample that is closest to uIndex.\r
455 <P>\r
456 <DD><DL>\r
457 <DT><B>Parameters:</B><DD><CODE>uIndex</CODE> - the desired index<DD><CODE>unitPart</CODE> - do we want the first have (1) or the second
458                 half (2)
459 <DT><B>Returns:</B><DD>the sample nearest to the given index in the given
460                 part</DL>\r
461 </DD>\r
462 </DL>\r
463 <HR>\r
464 \r
465 <A NAME="getUnitSize(int)"><!-- --></A><H3>\r
466 getUnitSize</H3>\r
467 <PRE>\r
468 public int <B>getUnitSize</B>(int&nbsp;unitPart)</PRE>\r
469 <DL>\r
470 <DD>Returns the total number of residuals in the given part for this
471  diphone.\r
472 <P>\r
473 <DD><DL>\r
474 <DT><B>Parameters:</B><DD><CODE>unitPart</CODE> - indicates which part is of interest (1 or 2)
475 <DT><B>Returns:</B><DD>the number of residuals in the specified part</DL>\r
476 </DD>\r
477 </DL>\r
478 <HR>\r
479 \r
480 <A NAME="dump()"><!-- --></A><H3>\r
481 dump</H3>\r
482 <PRE>\r
483 public void <B>dump</B>()</PRE>\r
484 <DL>\r
485 <DD>dumps out this Diphone.\r
486 <P>\r
487 <DD><DL>\r
488 </DL>\r
489 </DD>\r
490 </DL>\r
491 <HR>\r
492 \r
493 <A NAME="dumpBinary(java.nio.ByteBuffer)"><!-- --></A><H3>\r
494 dumpBinary</H3>\r
495 <PRE>\r
496 public void <B>dumpBinary</B>(java.nio.ByteBuffer&nbsp;bb)
497                 throws java.io.IOException</PRE>\r
498 <DL>\r
499 <DD>Dumps the diphone to the given channel.\r
500 <P>\r
501 <DD><DL>\r
502 <DT><B>Parameters:</B><DD><CODE>bb</CODE> - the ByteBuffer to write to
503 <DT><B>Throws:</B>
504 <DD><CODE>java.io.IOException</CODE> - if IO error occurs</DL>\r
505 </DD>\r
506 </DL>\r
507 <HR>\r
508 \r
509 <A NAME="dumpBinary(java.io.DataOutputStream)"><!-- --></A><H3>\r
510 dumpBinary</H3>\r
511 <PRE>\r
512 public void <B>dumpBinary</B>(java.io.DataOutputStream&nbsp;os)
513                 throws java.io.IOException</PRE>\r
514 <DL>\r
515 <DD>Dumps the diphone to the given channel.\r
516 <P>\r
517 <DD><DL>\r
518 <DT><B>Parameters:</B><DD><CODE>os</CODE> - the DataOutputStream to write to
519 <DT><B>Throws:</B>
520 <DD><CODE>java.io.IOException</CODE> - if IO error occurs</DL>\r
521 </DD>\r
522 </DL>\r
523 <HR>\r
524 \r
525 <A NAME="loadBinary(java.nio.ByteBuffer)"><!-- --></A><H3>\r
526 loadBinary</H3>\r
527 <PRE>\r
528 public static <A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html" title="class in com.sun.speech.freetts.diphone">Diphone</A> <B>loadBinary</B>(java.nio.ByteBuffer&nbsp;bb)
529                           throws java.io.IOException</PRE>\r
530 <DL>\r
531 <DD>Loads a new diphone from  the given buffer.\r
532 <P>\r
533 <DD><DL>\r
534 <DT><B>Parameters:</B><DD><CODE>bb</CODE> - the byte buffer to load the diphone from
535 <DT><B>Returns:</B><DD>the new diphone
536 <DT><B>Throws:</B>
537 <DD><CODE>java.io.IOException</CODE> - if IO error occurs</DL>\r
538 </DD>\r
539 </DL>\r
540 <HR>\r
541 \r
542 <A NAME="loadBinary(java.io.DataInputStream)"><!-- --></A><H3>\r
543 loadBinary</H3>\r
544 <PRE>\r
545 public static <A HREF="../../../../../com/sun/speech/freetts/diphone/Diphone.html" title="class in com.sun.speech.freetts.diphone">Diphone</A> <B>loadBinary</B>(java.io.DataInputStream&nbsp;dis)
546                           throws java.io.IOException</PRE>\r
547 <DL>\r
548 <DD>Loads a new  diphone from  the given DataInputStream.\r
549 <P>\r
550 <DD><DL>\r
551 <DT><B>Parameters:</B><DD><CODE>dis</CODE> - the datainput stream to load the diphone from
552 <DT><B>Returns:</B><DD>the new diphone
553 <DT><B>Throws:</B>
554 <DD><CODE>java.io.IOException</CODE> - if IO error occurs</DL>\r
555 </DD>\r
556 </DL>\r
557 <!-- ========= END OF CLASS DATA ========= -->\r
558 <HR>\r
559 \r
560
561 <!-- ======= START OF BOTTOM NAVBAR ====== -->\r
562 <A NAME="navbar_bottom"><!-- --></A>
563 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
564 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">\r
565 <TR>\r
566 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">\r
567 <A NAME="navbar_bottom_firstrow"><!-- --></A>
568 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">\r
569   <TR ALIGN="center" VALIGN="top">\r
570   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>\r
571   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>\r
572   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>\r
573   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>\r
574   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>\r
575   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>\r
576   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>\r
577   </TR>\r
578 </TABLE>\r
579 </TD>\r
580 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>\r
581 </EM>\r
582 </TD>\r
583 </TR>\r
584 \r
585 <TR>\r
586 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
587 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/AliasDiphone.html" title="class in com.sun.speech.freetts.diphone"><B>PREV CLASS</B></A>&nbsp;\r
588 &nbsp;<A HREF="../../../../../com/sun/speech/freetts/diphone/DiphonePitchmarkGenerator.html" title="class in com.sun.speech.freetts.diphone"><B>NEXT CLASS</B></A></FONT></TD>\r
589 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">\r
590   <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;\r
591 &nbsp;<A HREF="Diphone.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;\r
592 &nbsp;<SCRIPT type="text/javascript">\r
593   <!--\r
594   if(window==top) {\r
595     document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');\r
596   }\r
597   //-->\r
598 </SCRIPT>\r
599 <NOSCRIPT>\r
600   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>\r
601 </NOSCRIPT>
602 \r
603 </FONT></TD>\r
604 </TR>\r
605 <TR>\r
606 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
607   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>\r
608 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">\r
609 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>\r
610 </TR>\r
611 </TABLE>\r
612 <A NAME="skip-navbar_bottom"></A>
613 <!-- ======== END OF BOTTOM NAVBAR ======= -->\r
614 \r
615 <HR>\r
616 \r
617 </BODY>\r
618 </HTML>\r