/documentation/tts/com/google/tts/TTS.html
HTML | 733 lines | 633 code | 77 blank | 23 comment | 0 complexity | 1f99a90ce75accbc1d3a6a1f6865189c MD5 | raw file
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<!-- Generated by javadoc (build 1.6.0_16) on Fri Oct 09 19:06:10 PDT 2009 --> 6<TITLE> 7TTS 8</TITLE> 9 10<META NAME="date" CONTENT="2009-10-09"> 11 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> 13 14<SCRIPT type="text/javascript"> 15function windowTitle() 16{ 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="TTS"; 19 } 20} 21</SCRIPT> 22<NOSCRIPT> 23</NOSCRIPT> 24 25</HEAD> 26 27<BODY BGCOLOR="white" onload="windowTitle();"> 28<HR> 29 30 31<!-- ========= START OF TOP NAVBAR ======= --> 32<A NAME="navbar_top"><!-- --></A> 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 35<TR> 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 37<A NAME="navbar_top_firstrow"><!-- --></A> 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 39 <TR ALIGN="center" VALIGN="top"> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/google/tts/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 41 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 46 </TR> 47</TABLE> 48</TD> 49<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 50</EM> 51</TD> 52</TR> 53 54<TR> 55<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 56 <A HREF="../../../com/google/tts/TextToSpeechBeta.OnUtteranceCompletedListener.html" title="interface in com.google.tts"><B>PREV CLASS</B></A> 57 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts"><B>NEXT CLASS</B></A></FONT></TD> 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 59 <A HREF="../../../index.html?com/google/tts/TTS.html" target="_top"><B>FRAMES</B></A> 60 <A HREF="TTS.html" target="_top"><B>NO FRAMES</B></A> 61 <SCRIPT type="text/javascript"> 62 <!-- 63 if(window==top) { 64 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 65 } 66 //--> 67</SCRIPT> 68<NOSCRIPT> 69 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 70</NOSCRIPT> 71 72 73</FONT></TD> 74</TR> 75<TR> 76<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 77 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 80</TR> 81</TABLE> 82<A NAME="skip-navbar_top"></A> 83<!-- ========= END OF TOP NAVBAR ========= --> 84 85<HR> 86<!-- ======== START OF CLASS DATA ======== --> 87<H2> 88<FONT SIZE="-1"> 89com.google.tts</FONT> 90<BR> 91Class TTS</H2> 92<PRE> 93java.lang.Object 94 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.tts.TTS</B> 95</PRE> 96<HR> 97<B>Deprecated.</B> <I>- Use TextToSpeechBeta instead</I> 98<P> 99<DL> 100<DT><PRE>public class <B>TTS</B><DT>extends java.lang.Object</DL> 101</PRE> 102 103<P> 104Synthesizes speech from text. This abstracts away the complexities of using 105 the TTS service such as setting up the IBinder connection and handling 106 RemoteExceptions, etc. 107 108 The TTS should always be safe the use; if the user does not have the 109 necessary TTS apk installed, the behavior is that all calls to the TTS act as 110 no-ops. 111<P> 112 113<P> 114<HR> 115 116<P> 117<!-- ======== NESTED CLASS SUMMARY ======== --> 118 119<A NAME="nested_class_summary"><!-- --></A> 120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 123<B>Nested Class Summary</B></FONT></TH> 124</TR> 125<TR BGCOLOR="white" CLASS="TableRowColor"> 126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 127<CODE>static interface</CODE></FONT></TD> 128<TD><CODE><B><A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts">TTS.InitListener</A></B></CODE> 129 130<BR> 131 <B>Deprecated.</B> Called when the TTS has initialized 132 133 The InitListener must implement the onInit function.</TD> 134</TR> 135<TR BGCOLOR="white" CLASS="TableRowColor"> 136<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 137<CODE>static interface</CODE></FONT></TD> 138<TD><CODE><B><A HREF="../../../com/google/tts/TTS.SpeechCompletedListener.html" title="interface in com.google.tts">TTS.SpeechCompletedListener</A></B></CODE> 139 140<BR> 141 <B>Deprecated.</B> Called when the TTS has finished speaking by itself (ie, speaking finished 142 without being canceled).</TD> 143</TR> 144</TABLE> 145 146<!-- ======== CONSTRUCTOR SUMMARY ======== --> 147 148<A NAME="constructor_summary"><!-- --></A> 149<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 150<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 151<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 152<B>Constructor Summary</B></FONT></TH> 153</TR> 154<TR BGCOLOR="white" CLASS="TableRowColor"> 155<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#TTS(Context, com.google.tts.TTS.InitListener, boolean)">TTS</A></B>(Context context, 156 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts">TTS.InitListener</A> callback, 157 boolean displayInstallMessage)</CODE> 158 159<BR> 160 <B>Deprecated.</B> The constructor for the TTS.</TD> 161</TR> 162<TR BGCOLOR="white" CLASS="TableRowColor"> 163<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#TTS(Context, com.google.tts.TTS.InitListener, com.google.tts.TTSVersionAlert)">TTS</A></B>(Context context, 164 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts">TTS.InitListener</A> callback, 165 <A HREF="../../../com/google/tts/TTSVersionAlert.html" title="class in com.google.tts">TTSVersionAlert</A> alert)</CODE> 166 167<BR> 168 <B>Deprecated.</B> The constructor for the TTS.</TD> 169</TR> 170</TABLE> 171 172<!-- ========== METHOD SUMMARY =========== --> 173 174<A NAME="method_summary"><!-- --></A> 175<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 176<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 177<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 178<B>Method Summary</B></FONT></TH> 179</TR> 180<TR BGCOLOR="white" CLASS="TableRowColor"> 181<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 182<CODE> void</CODE></FONT></TD> 183<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#addSpeech(java.lang.String, java.lang.String)">addSpeech</A></B>(java.lang.String text, 184 java.lang.String filename)</CODE> 185 186<BR> 187 <B>Deprecated.</B> Adds a mapping between a string of text and a sound file.</TD> 188</TR> 189<TR BGCOLOR="white" CLASS="TableRowColor"> 190<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 191<CODE> void</CODE></FONT></TD> 192<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#addSpeech(java.lang.String, java.lang.String, int)">addSpeech</A></B>(java.lang.String text, 193 java.lang.String packagename, 194 int resourceId)</CODE> 195 196<BR> 197 <B>Deprecated.</B> Adds a mapping between a string of text and a sound resource in a package.</TD> 198</TR> 199<TR BGCOLOR="white" CLASS="TableRowColor"> 200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 201<CODE> int</CODE></FONT></TD> 202<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#getVersion()">getVersion</A></B>()</CODE> 203 204<BR> 205 <B>Deprecated.</B> Returns the version number of the TTS library that the user has installed.</TD> 206</TR> 207<TR BGCOLOR="white" CLASS="TableRowColor"> 208<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 209<CODE>static boolean</CODE></FONT></TD> 210<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#isInstalled(Context)">isInstalled</A></B>(Context ctx)</CODE> 211 212<BR> 213 <B>Deprecated.</B> Checks if the TTS service is installed or not</TD> 214</TR> 215<TR BGCOLOR="white" CLASS="TableRowColor"> 216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 217<CODE> boolean</CODE></FONT></TD> 218<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#isSpeaking()">isSpeaking</A></B>()</CODE> 219 220<BR> 221 <B>Deprecated.</B> Returns whether or not the TTS is busy speaking.</TD> 222</TR> 223<TR BGCOLOR="white" CLASS="TableRowColor"> 224<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 225<CODE> void</CODE></FONT></TD> 226<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#playEarcon(java.lang.String, int, java.lang.String[])">playEarcon</A></B>(java.lang.String earcon, 227 int queueMode, 228 java.lang.String[] params)</CODE> 229 230<BR> 231 <B>Deprecated.</B> Plays the earcon using the specified queueing mode and parameters.</TD> 232</TR> 233<TR BGCOLOR="white" CLASS="TableRowColor"> 234<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 235<CODE> void</CODE></FONT></TD> 236<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#playEarcon(com.google.tts.TTSEarcon, int, java.lang.String[])">playEarcon</A></B>(<A HREF="../../../com/google/tts/TTSEarcon.html" title="enum in com.google.tts">TTSEarcon</A> earcon, 237 int queueMode, 238 java.lang.String[] params)</CODE> 239 240<BR> 241 <B>Deprecated.</B> Plays the earcon using the specified queueing mode and parameters.</TD> 242</TR> 243<TR BGCOLOR="white" CLASS="TableRowColor"> 244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 245<CODE> void</CODE></FONT></TD> 246<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#setEngine(java.lang.String)">setEngine</A></B>(java.lang.String ttsEngineBinary)</CODE> 247 248<BR> 249 <B>Deprecated.</B> </TD> 250</TR> 251<TR BGCOLOR="white" CLASS="TableRowColor"> 252<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 253<CODE> void</CODE></FONT></TD> 254<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#setEngine(com.google.tts.TTSEngine)">setEngine</A></B>(<A HREF="../../../com/google/tts/TTSEngine.html" title="enum in com.google.tts">TTSEngine</A> selectedEngine)</CODE> 255 256<BR> 257 <B>Deprecated.</B> Sets the TTS engine to be used.</TD> 258</TR> 259<TR BGCOLOR="white" CLASS="TableRowColor"> 260<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 261<CODE> void</CODE></FONT></TD> 262<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#setLanguage(java.lang.String)">setLanguage</A></B>(java.lang.String language)</CODE> 263 264<BR> 265 <B>Deprecated.</B> Sets the language for the TTS engine.</TD> 266</TR> 267<TR BGCOLOR="white" CLASS="TableRowColor"> 268<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 269<CODE> void</CODE></FONT></TD> 270<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#setOnSpeechCompletedListener(com.google.tts.TTS.SpeechCompletedListener)">setOnSpeechCompletedListener</A></B>(<A HREF="../../../com/google/tts/TTS.SpeechCompletedListener.html" title="interface in com.google.tts">TTS.SpeechCompletedListener</A> listener)</CODE> 271 272<BR> 273 <B>Deprecated.</B> </TD> 274</TR> 275<TR BGCOLOR="white" CLASS="TableRowColor"> 276<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 277<CODE> void</CODE></FONT></TD> 278<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#setSpeechRate(int)">setSpeechRate</A></B>(int speechRate)</CODE> 279 280<BR> 281 <B>Deprecated.</B> Sets the speech rate for the TTS engine.</TD> 282</TR> 283<TR BGCOLOR="white" CLASS="TableRowColor"> 284<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 285<CODE> void</CODE></FONT></TD> 286<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#showVersionAlert()">showVersionAlert</A></B>()</CODE> 287 288<BR> 289 <B>Deprecated.</B> Displays an alert that prompts users to install the TTS that is available 290 on the Market.</TD> 291</TR> 292<TR BGCOLOR="white" CLASS="TableRowColor"> 293<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 294<CODE> void</CODE></FONT></TD> 295<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#shutdown()">shutdown</A></B>()</CODE> 296 297<BR> 298 <B>Deprecated.</B> Shuts down the TTS.</TD> 299</TR> 300<TR BGCOLOR="white" CLASS="TableRowColor"> 301<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 302<CODE> void</CODE></FONT></TD> 303<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#speak(java.lang.String, int, java.lang.String[])">speak</A></B>(java.lang.String text, 304 int queueMode, 305 java.lang.String[] params)</CODE> 306 307<BR> 308 <B>Deprecated.</B> Speaks the string using the specified queuing strategy and speech 309 parameters.</TD> 310</TR> 311<TR BGCOLOR="white" CLASS="TableRowColor"> 312<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 313<CODE> void</CODE></FONT></TD> 314<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#stop()">stop</A></B>()</CODE> 315 316<BR> 317 <B>Deprecated.</B> Stops speech from the TTS.</TD> 318</TR> 319<TR BGCOLOR="white" CLASS="TableRowColor"> 320<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 321<CODE> boolean</CODE></FONT></TD> 322<TD><CODE><B><A HREF="../../../com/google/tts/TTS.html#synthesizeToFile(java.lang.String, java.lang.String[], java.lang.String)">synthesizeToFile</A></B>(java.lang.String text, 323 java.lang.String[] params, 324 java.lang.String filename)</CODE> 325 326<BR> 327 <B>Deprecated.</B> Speaks the given text using the specified queueing mode and parameters.</TD> 328</TR> 329</TABLE> 330 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 331<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 332<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 333<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> 334</TR> 335<TR BGCOLOR="white" CLASS="TableRowColor"> 336<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> 337</TR> 338</TABLE> 339 340<P> 341 342<!-- ========= CONSTRUCTOR DETAIL ======== --> 343 344<A NAME="constructor_detail"><!-- --></A> 345<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 346<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 347<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 348<B>Constructor Detail</B></FONT></TH> 349</TR> 350</TABLE> 351 352<A NAME="TTS(Context, com.google.tts.TTS.InitListener, boolean)"><!-- --></A><H3> 353TTS</H3> 354<PRE> 355public <B>TTS</B>(Context context, 356 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts">TTS.InitListener</A> callback, 357 boolean displayInstallMessage)</PRE> 358<DL> 359<DD><B>Deprecated.</B> <DD>The constructor for the TTS. 360<P> 361<DL> 362<DT><B>Parameters:</B><DD><CODE>context</CODE> - The context<DD><CODE>callback</CODE> - The InitListener that should be called when the TTS has 363 initialized successfully.<DD><CODE>displayInstallMessage</CODE> - Boolean indicating whether or not an 364 installation prompt should be displayed to users who do not have the 365 TTS library. If this is true, a generic alert asking the user to 366 install the TTS will be used. If you wish to specify the exact 367 message of that prompt, please use TTS(Context context, InitListener 368 callback, TTSVersionAlert alert) as the constructor instead.</DL> 369</DL> 370<HR> 371 372<A NAME="TTS(Context, com.google.tts.TTS.InitListener, com.google.tts.TTSVersionAlert)"><!-- --></A><H3> 373TTS</H3> 374<PRE> 375public <B>TTS</B>(Context context, 376 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts">TTS.InitListener</A> callback, 377 <A HREF="../../../com/google/tts/TTSVersionAlert.html" title="class in com.google.tts">TTSVersionAlert</A> alert)</PRE> 378<DL> 379<DD><B>Deprecated.</B> <DD>The constructor for the TTS. 380<P> 381<DL> 382<DT><B>Parameters:</B><DD><CODE>context</CODE> - The context<DD><CODE>callback</CODE> - The InitListener that should be called when the TTS has 383 initialized successfully.<DD><CODE>alert</CODE> - The TTSVersionAlert to be displayed</DL> 384</DL> 385 386<!-- ============ METHOD DETAIL ========== --> 387 388<A NAME="method_detail"><!-- --></A> 389<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 390<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 391<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 392<B>Method Detail</B></FONT></TH> 393</TR> 394</TABLE> 395 396<A NAME="setOnSpeechCompletedListener(com.google.tts.TTS.SpeechCompletedListener)"><!-- --></A><H3> 397setOnSpeechCompletedListener</H3> 398<PRE> 399public void <B>setOnSpeechCompletedListener</B>(<A HREF="../../../com/google/tts/TTS.SpeechCompletedListener.html" title="interface in com.google.tts">TTS.SpeechCompletedListener</A> listener)</PRE> 400<DL> 401<DD><B>Deprecated.</B> <DD><DL> 402</DL> 403</DD> 404</DL> 405<HR> 406 407<A NAME="shutdown()"><!-- --></A><H3> 408shutdown</H3> 409<PRE> 410public void <B>shutdown</B>()</PRE> 411<DL> 412<DD><B>Deprecated.</B> <DD>Shuts down the TTS. It is good practice to call this in the onDestroy 413 method of the Activity that is using the TTS so that the TTS is stopped 414 cleanly. 415<P> 416<DD><DL> 417</DL> 418</DD> 419</DL> 420<HR> 421 422<A NAME="addSpeech(java.lang.String, java.lang.String, int)"><!-- --></A><H3> 423addSpeech</H3> 424<PRE> 425public void <B>addSpeech</B>(java.lang.String text, 426 java.lang.String packagename, 427 int resourceId)</PRE> 428<DL> 429<DD><B>Deprecated.</B> <DD>Adds a mapping between a string of text and a sound resource in a package. 430<P> 431<DD><DL> 432<DT><B>Parameters:</B><DD><CODE>text</CODE> - Example: <b><code>"south_south_east"</code></b><br/><DD><CODE>packagename</CODE> - Pass the packagename of the application that contains 433 the resource. If the resource is in your own application (this is 434 the most common case), then put the packagename of your application 435 here.<br/> 436 Example: <b>"com.google.marvin.compass"</b><br/> 437 The packagename can be found in the AndroidManifest.xml of your 438 application. 439 <p> 440 <code><manifest xmlns:android="..." 441 package="<b>com.google.marvin.compass</b>"></code> 442 </p><DD><CODE>resourceId</CODE> - Example: <b><code>R.raw.south_south_east</code></b><DT><B>See Also:</B><DD><CODE>#TTS.speak(String text, int queueMode, String[] params)</CODE></DL> 443</DD> 444</DL> 445<HR> 446 447<A NAME="addSpeech(java.lang.String, java.lang.String)"><!-- --></A><H3> 448addSpeech</H3> 449<PRE> 450public void <B>addSpeech</B>(java.lang.String text, 451 java.lang.String filename)</PRE> 452<DL> 453<DD><B>Deprecated.</B> <DD>Adds a mapping between a string of text and a sound file. Using this, it is 454 possible to add custom pronounciations for text. 455<P> 456<DD><DL> 457<DT><B>Parameters:</B><DD><CODE>text</CODE> - The string of text<DD><CODE>filename</CODE> - The full path to the sound file (for example: 458 "/sdcard/mysounds/hello.wav")</DL> 459</DD> 460</DL> 461<HR> 462 463<A NAME="speak(java.lang.String, int, java.lang.String[])"><!-- --></A><H3> 464speak</H3> 465<PRE> 466public void <B>speak</B>(java.lang.String text, 467 int queueMode, 468 java.lang.String[] params)</PRE> 469<DL> 470<DD><B>Deprecated.</B> <DD>Speaks the string using the specified queuing strategy and speech 471 parameters. Note that the speech parameters are not universally supported 472 by all engines and will be treated as a hint. The TTS library will try to 473 fulfill these parameters as much as possible, but there is no guarantee 474 that the voice used will have the properties specified. 475<P> 476<DD><DL> 477<DT><B>Parameters:</B><DD><CODE>text</CODE> - The string of text to be spoken.<DD><CODE>queueMode</CODE> - The queuing strategy to use. Use 0 for no queuing, and 1 478 for queuing.<DD><CODE>params</CODE> - The array of speech parameters to be used. Currently, only 479 params[0] is defined - it is for setting the type of voice if the 480 engine allows it. Possible values are "VOICE_MALE", "VOICE_FEMALE", 481 and "VOICE_ROBOT". Note that right now only the pre-recorded voice 482 has this support - this setting has no effect on eSpeak.</DL> 483</DD> 484</DL> 485<HR> 486 487<A NAME="playEarcon(java.lang.String, int, java.lang.String[])"><!-- --></A><H3> 488playEarcon</H3> 489<PRE> 490public void <B>playEarcon</B>(java.lang.String earcon, 491 int queueMode, 492 java.lang.String[] params)</PRE> 493<DL> 494<DD><B>Deprecated.</B> <DD>Plays the earcon using the specified queueing mode and parameters. 495<P> 496<DD><DL> 497<DT><B>Parameters:</B><DD><CODE>earcon</CODE> - The earcon that should be played<DD><CODE>queueMode</CODE> - 0 for no queue (interrupts all previous utterances), 1 for 498 queued<DD><CODE>params</CODE> - An ArrayList of parameters.</DL> 499</DD> 500</DL> 501<HR> 502 503<A NAME="playEarcon(com.google.tts.TTSEarcon, int, java.lang.String[])"><!-- --></A><H3> 504playEarcon</H3> 505<PRE> 506public void <B>playEarcon</B>(<A HREF="../../../com/google/tts/TTSEarcon.html" title="enum in com.google.tts">TTSEarcon</A> earcon, 507 int queueMode, 508 java.lang.String[] params)</PRE> 509<DL> 510<DD><B>Deprecated.</B> <DD>Plays the earcon using the specified queueing mode and parameters. 511<P> 512<DD><DL> 513<DT><B>Parameters:</B><DD><CODE>earcon</CODE> - The TTSEarcon that should be played<DD><CODE>queueMode</CODE> - 0 for no queue (interrupts all previous utterances), 1 for 514 queued<DD><CODE>params</CODE> - An ArrayList of parameters.</DL> 515</DD> 516</DL> 517<HR> 518 519<A NAME="isSpeaking()"><!-- --></A><H3> 520isSpeaking</H3> 521<PRE> 522public boolean <B>isSpeaking</B>()</PRE> 523<DL> 524<DD><B>Deprecated.</B> <DD>Returns whether or not the TTS is busy speaking. 525<P> 526<DD><DL> 527 528<DT><B>Returns:</B><DD>Whether or not the TTS is busy speaking.</DL> 529</DD> 530</DL> 531<HR> 532 533<A NAME="stop()"><!-- --></A><H3> 534stop</H3> 535<PRE> 536public void <B>stop</B>()</PRE> 537<DL> 538<DD><B>Deprecated.</B> <DD>Stops speech from the TTS. 539<P> 540<DD><DL> 541</DL> 542</DD> 543</DL> 544<HR> 545 546<A NAME="getVersion()"><!-- --></A><H3> 547getVersion</H3> 548<PRE> 549public int <B>getVersion</B>()</PRE> 550<DL> 551<DD><B>Deprecated.</B> <DD>Returns the version number of the TTS library that the user has installed. 552<P> 553<DD><DL> 554 555<DT><B>Returns:</B><DD>The version number of the TTS library that the user has installed.</DL> 556</DD> 557</DL> 558<HR> 559 560<A NAME="setEngine(com.google.tts.TTSEngine)"><!-- --></A><H3> 561setEngine</H3> 562<PRE> 563public void <B>setEngine</B>(<A HREF="../../../com/google/tts/TTSEngine.html" title="enum in com.google.tts">TTSEngine</A> selectedEngine)</PRE> 564<DL> 565<DD><B>Deprecated.</B> <DD>Sets the TTS engine to be used. 566<P> 567<DD><DL> 568<DT><B>Parameters:</B><DD><CODE>selectedEngine</CODE> - The TTS engine that should be used.</DL> 569</DD> 570</DL> 571<HR> 572 573<A NAME="setEngine(java.lang.String)"><!-- --></A><H3> 574setEngine</H3> 575<PRE> 576public void <B>setEngine</B>(java.lang.String ttsEngineBinary)</PRE> 577<DL> 578<DD><B>Deprecated.</B> <DD><DL> 579</DL> 580</DD> 581</DL> 582<HR> 583 584<A NAME="setSpeechRate(int)"><!-- --></A><H3> 585setSpeechRate</H3> 586<PRE> 587public void <B>setSpeechRate</B>(int speechRate)</PRE> 588<DL> 589<DD><B>Deprecated.</B> <DD>Sets the speech rate for the TTS engine. 590 591 Note that the speech rate is not universally supported by all engines and 592 will be treated as a hint. The TTS library will try to use the specified 593 speech rate, but there is no guarantee. 594 595 Currently, this will change the speech rate for the espeak engine, but it 596 has no effect on any pre-recorded speech. 597<P> 598<DD><DL> 599<DT><B>Parameters:</B><DD><CODE>speechRate</CODE> - The speech rate for the TTS engine.</DL> 600</DD> 601</DL> 602<HR> 603 604<A NAME="setLanguage(java.lang.String)"><!-- --></A><H3> 605setLanguage</H3> 606<PRE> 607public void <B>setLanguage</B>(java.lang.String language)</PRE> 608<DL> 609<DD><B>Deprecated.</B> <DD>Sets the language for the TTS engine. 610 611 Note that the language is not universally supported by all engines and will 612 be treated as a hint. The TTS library will try to use the specified 613 language, but there is no guarantee. 614 615 Currently, this will change the language for the espeak engine, but it has 616 no effect on any pre-recorded speech. 617<P> 618<DD><DL> 619<DT><B>Parameters:</B><DD><CODE>language</CODE> - The language to be used. The languages are specified by 620 their IETF language tags as defined by BCP 47. This is the same 621 standard used for the lang attribute in HTML. See: 622 http://en.wikipedia.org/wiki/IETF_language_tag</DL> 623</DD> 624</DL> 625<HR> 626 627<A NAME="synthesizeToFile(java.lang.String, java.lang.String[], java.lang.String)"><!-- --></A><H3> 628synthesizeToFile</H3> 629<PRE> 630public boolean <B>synthesizeToFile</B>(java.lang.String text, 631 java.lang.String[] params, 632 java.lang.String filename)</PRE> 633<DL> 634<DD><B>Deprecated.</B> <DD>Speaks the given text using the specified queueing mode and parameters. 635<P> 636<DD><DL> 637<DT><B>Parameters:</B><DD><CODE>text</CODE> - The String of text that should be synthesized<DD><CODE>params</CODE> - An ArrayList of parameters. The first element of this array 638 controls the type of voice to use.<DD><CODE>filename</CODE> - The string that gives the full output filename; it should 639 be something like "/sdcard/myappsounds/mysound.wav". 640<DT><B>Returns:</B><DD>A boolean that indicates if the synthesis succeeded</DL> 641</DD> 642</DL> 643<HR> 644 645<A NAME="showVersionAlert()"><!-- --></A><H3> 646showVersionAlert</H3> 647<PRE> 648public void <B>showVersionAlert</B>()</PRE> 649<DL> 650<DD><B>Deprecated.</B> <DD>Displays an alert that prompts users to install the TTS that is available 651 on the Market. This is useful if the application expects a newer version of 652 the TTS than what the user has. 653<P> 654<DD><DL> 655</DL> 656</DD> 657</DL> 658<HR> 659 660<A NAME="isInstalled(Context)"><!-- --></A><H3> 661isInstalled</H3> 662<PRE> 663public static boolean <B>isInstalled</B>(Context ctx)</PRE> 664<DL> 665<DD><B>Deprecated.</B> <DD>Checks if the TTS service is installed or not 666<P> 667<DD><DL> 668 669<DT><B>Returns:</B><DD>A boolean that indicates whether the TTS service is installed</DL> 670</DD> 671</DL> 672<!-- ========= END OF CLASS DATA ========= --> 673<HR> 674 675 676<!-- ======= START OF BOTTOM NAVBAR ====== --> 677<A NAME="navbar_bottom"><!-- --></A> 678<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 679<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 680<TR> 681<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 682<A NAME="navbar_bottom_firstrow"><!-- --></A> 683<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 684 <TR ALIGN="center" VALIGN="top"> 685 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/google/tts/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 686 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 687 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 688 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 689 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 690 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 691 </TR> 692</TABLE> 693</TD> 694<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 695</EM> 696</TD> 697</TR> 698 699<TR> 700<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 701 <A HREF="../../../com/google/tts/TextToSpeechBeta.OnUtteranceCompletedListener.html" title="interface in com.google.tts"><B>PREV CLASS</B></A> 702 <A HREF="../../../com/google/tts/TTS.InitListener.html" title="interface in com.google.tts"><B>NEXT CLASS</B></A></FONT></TD> 703<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 704 <A HREF="../../../index.html?com/google/tts/TTS.html" target="_top"><B>FRAMES</B></A> 705 <A HREF="TTS.html" target="_top"><B>NO FRAMES</B></A> 706 <SCRIPT type="text/javascript"> 707 <!-- 708 if(window==top) { 709 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 710 } 711 //--> 712</SCRIPT> 713<NOSCRIPT> 714 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 715</NOSCRIPT> 716 717 718</FONT></TD> 719</TR> 720<TR> 721<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 722 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 723<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 724DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 725</TR> 726</TABLE> 727<A NAME="skip-navbar_bottom"></A> 728<!-- ======== END OF BOTTOM NAVBAR ======= --> 729 730<HR> 731 732</BODY> 733</HTML>