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:29 CET 2009 -->
\r
7 VoiceManager (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.VoiceManager 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="VoiceManager (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/VoiceDirectory.html" title="class in com.sun.speech.freetts"><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="VoiceManager.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
74 DETAIL: FIELD | CONSTR | <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</FONT>
\r
86 Class VoiceManager</H2>
\r
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>com.sun.speech.freetts.VoiceManager</B>
\r
93 <DT>public class <B>VoiceManager</B><DT>extends java.lang.Object</DL>
\r
96 Provides access to voices for all of FreeTTS. There is only one instance of
99 Each call to getVoices() creates a new instance of each voice.
\r
104 <DT><B>See Also:</B><DD><A HREF="../../../../com/sun/speech/freetts/Voice.html" title="class in com.sun.speech.freetts"><CODE>Voice</CODE></A>,
105 <A HREF="../../../../com/sun/speech/freetts/VoiceDirectory.html" title="class in com.sun.speech.freetts"><CODE>VoiceDirectory</CODE></A></DL>
\r
109 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
112 <!-- =========== FIELD SUMMARY =========== -->
\r
115 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
118 <!-- ========== METHOD SUMMARY =========== -->
\r
120 <A NAME="method_summary"><!-- --></A>
121 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
122 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
123 <TD COLSPAN=2><FONT SIZE="+2">
\r
124 <B>Method Summary</B></FONT></TD>
\r
126 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
128 <CODE> boolean</CODE></FONT></TD>
\r
129 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#contains(java.lang.String)">contains</A></B>(java.lang.String voiceName)</CODE>
\r
132 Check if there is a voice provides with the given name.</TD>
\r
134 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
135 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
136 <CODE>static <A HREF="../../../../com/sun/speech/freetts/VoiceManager.html" title="class in com.sun.speech.freetts">VoiceManager</A></CODE></FONT></TD>
\r
137 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#getInstance()">getInstance</A></B>()</CODE>
\r
140 Gets the instance of the VoiceManager</TD>
\r
142 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
143 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
144 <CODE> <A HREF="../../../../com/sun/speech/freetts/Voice.html" title="class in com.sun.speech.freetts">Voice</A></CODE></FONT></TD>
\r
145 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#getVoice(java.lang.String)">getVoice</A></B>(java.lang.String voiceName)</CODE>
\r
148 Get a Voice with a given name.</TD>
\r
150 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
152 <CODE>static java.net.URLClassLoader</CODE></FONT></TD>
\r
153 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#getVoiceClassLoader()">getVoiceClassLoader</A></B>()</CODE>
\r
156 Gets the class loader used for loading dynamically detected jars. </TD>
\r
158 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
159 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
160 <CODE> java.lang.String</CODE></FONT></TD>
\r
161 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#getVoiceInfo()">getVoiceInfo</A></B>()</CODE>
\r
164 Prints detailed information about all available voices.</TD>
\r
166 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
167 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
168 <CODE> <A HREF="../../../../com/sun/speech/freetts/Voice.html" title="class in com.sun.speech.freetts">Voice</A>[]</CODE></FONT></TD>
\r
169 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#getVoices()">getVoices</A></B>()</CODE>
\r
172 Provide an array of all voices available to FreeTTS.
176 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
177 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
178 <CODE> java.lang.String</CODE></FONT></TD>
\r
179 <TD><CODE><B><A HREF="../../../../com/sun/speech/freetts/VoiceManager.html#toString()">toString</A></B>()</CODE>
\r
182 Provides a string representation of all voices available to FreeTTS.</TD>
\r
185 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
186 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
187 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
188 <TD><B>Methods inherited from class java.lang.Object</B></TD>
\r
190 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
191 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
\r
197 <!-- ============ FIELD DETAIL =========== -->
\r
200 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
203 <!-- ============ METHOD DETAIL ========== -->
\r
205 <A NAME="method_detail"><!-- --></A>
206 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
207 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
208 <TD COLSPAN=1><FONT SIZE="+2">
\r
209 <B>Method Detail</B></FONT></TD>
\r
213 <A NAME="getInstance()"><!-- --></A><H3>
\r
216 public static <A HREF="../../../../com/sun/speech/freetts/VoiceManager.html" title="class in com.sun.speech.freetts">VoiceManager</A> <B>getInstance</B>()</PRE>
\r
218 <DD>Gets the instance of the VoiceManager
\r
222 <DT><B>Returns:</B><DD>a VoiceManager</DL>
\r
227 <A NAME="getVoices()"><!-- --></A><H3>
\r
230 public <A HREF="../../../../com/sun/speech/freetts/Voice.html" title="class in com.sun.speech.freetts">Voice</A>[] <B>getVoices</B>()</PRE>
\r
232 <DD>Provide an array of all voices available to FreeTTS.
234 First, if the "freetts.voices" property is set, it is assumed to be a
235 comma-separated list of VoiceDirectory classnames (e.g.,
236 "-Dfreetts.voices=com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoiceDirectory"
237 ). If this property exists, the VoiceManager will use only this property
238 to find voices -- no other method described below will be used. The
239 primary purpose for this property is testing and for use with WebStart.
242 Second, the file internal_voices.txt is looked for in the same directory
243 as VoiceManager.class. If the file does not exist, the VoiceManager moves
244 on. Next, it looks for voices.txt in the same directory as freetts.jar.
245 If the file does not exist, the VoiceManager moves on. Next, if the
246 property "freetts.voicesfile" is defined, then that file is read in. If
247 the property is defined and the file does not exist, then an error is
251 Every voices file that is read in contains a list of VoiceDirectory class
255 Next, the voice manager looks for freetts voice jarfiles that may exist
256 in well-known locations. The directory that contains freetts.jar is
257 searched for voice jarfiles, then directories specified by the
258 "freetts.voicespath" system property. Any jarfile whose Manifest contains
259 "FreeTTSVoiceDefinition: true" is assumed to be a FreeTTS voice, and the
260 Manifest's "Main-Class" entry is assumed to be the name of the voice
261 directory. The dependencies of the voice jarfiles specified by the
262 "Class-Path" Manifest entry are also loaded.
265 The VoiceManager instantiates each voice directory and calls getVoices()
270 <DT><B>Returns:</B><DD>the array of new instances of all available voices</DL>
\r
275 <A NAME="getVoiceInfo()"><!-- --></A><H3>
\r
278 public java.lang.String <B>getVoiceInfo</B>()</PRE>
\r
280 <DD>Prints detailed information about all available voices.
\r
284 <DT><B>Returns:</B><DD>a String containing the information</DL>
\r
289 <A NAME="toString()"><!-- --></A><H3>
\r
292 public java.lang.String <B>toString</B>()</PRE>
\r
294 <DD>Provides a string representation of all voices available to FreeTTS.
\r
298 <DT><B>Returns:</B><DD>a String which is a space-delimited list of voice names. If there
299 is more than one voice, then the word "or" appears before the
305 <A NAME="contains(java.lang.String)"><!-- --></A><H3>
\r
308 public boolean <B>contains</B>(java.lang.String voiceName)</PRE>
\r
310 <DD>Check if there is a voice provides with the given name.
\r
313 <DT><B>Parameters:</B><DD><CODE>voiceName</CODE> - the name of the voice to check
314 <DT><B>Returns:</B><DD><b>true</b> if FreeTTS has a voice available with the name
315 <b>voiceName</b>, else <b>false</b>.</DL>
\r
320 <A NAME="getVoice(java.lang.String)"><!-- --></A><H3>
\r
323 public <A HREF="../../../../com/sun/speech/freetts/Voice.html" title="class in com.sun.speech.freetts">Voice</A> <B>getVoice</B>(java.lang.String voiceName)</PRE>
\r
325 <DD>Get a Voice with a given name.
\r
328 <DT><B>Parameters:</B><DD><CODE>voiceName</CODE> - the name of the voice to get.
329 <DT><B>Returns:</B><DD>the Voice that has the same name as <b>voiceName</b> if one
330 exists, else <b>null</b></DL>
\r
335 <A NAME="getVoiceClassLoader()"><!-- --></A><H3>
\r
336 getVoiceClassLoader</H3>
\r
338 public static java.net.URLClassLoader <B>getVoiceClassLoader</B>()</PRE>
\r
340 <DD>Gets the class loader used for loading dynamically detected jars. This is
341 useful to get resources out of jars that may be in the class path of this
342 class loader but not in the class path of the system class loader.
\r
346 <DT><B>Returns:</B><DD>the class loader</DL>
\r
349 <!-- ========= END OF CLASS DATA ========= -->
\r
353 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
354 <A NAME="navbar_bottom"><!-- --></A>
355 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
356 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
358 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
359 <A NAME="navbar_bottom_firstrow"><!-- --></A>
360 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
361 <TR ALIGN="center" VALIGN="top">
\r
362 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
363 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
364 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
365 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
366 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
367 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
368 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
372 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
378 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
379 <A HREF="../../../../com/sun/speech/freetts/VoiceDirectory.html" title="class in com.sun.speech.freetts"><B>PREV CLASS</B></A>
\r
380 NEXT CLASS</FONT></TD>
\r
381 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
382 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
383 <A HREF="VoiceManager.html" target="_top"><B>NO FRAMES</B></A>
\r
384 <SCRIPT type="text/javascript">
\r
387 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
392 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
398 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
399 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
400 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
401 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
404 <A NAME="skip-navbar_bottom"></A>
405 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r