/documentation/tts/com/google/tts/TTS.html

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