/documentation/tts/com/google/tts/TextToSpeechBeta.html
http://eyes-free.googlecode.com/ · HTML · 1064 lines · 936 code · 104 blank · 24 comment · 0 complexity · f10bb1cbe3998f9080b42b66a21bda5a MD5 · raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.6.0_16) on Fri Oct 09 19:06:10 PDT 2009 -->
- <TITLE>
- TextToSpeechBeta
- </TITLE>
-
- <META NAME="date" CONTENT="2009-10-09">
-
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
-
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="TextToSpeechBeta";
- }
- }
- </SCRIPT>
- <NOSCRIPT>
- </NOSCRIPT>
-
- </HEAD>
-
- <BODY BGCOLOR="white" onload="windowTitle();">
- <HR>
-
-
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/google/tts/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html" title="class in com.google.tts"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../index.html?com/google/tts/TextToSpeechBeta.html" target="_top"><B>FRAMES</B></A>
- <A HREF="TextToSpeechBeta.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
-
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- com.google.tts</FONT>
- <BR>
- Class TextToSpeechBeta</H2>
- <PRE>
- java.lang.Object
- <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">TextToSpeech
- <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.tts.TextToSpeechBeta</B>
- </PRE>
- <HR>
- <DL>
- <DT><PRE>public class <B>TextToSpeechBeta</B><DT>extends TextToSpeech</DL>
- </PRE>
-
- <P>
- Synthesizes speech from text for immediate playback or to create a sound
- file.
- <p>
- A TextToSpeech instance can only be used to synthesize text once it has
- completed its initialization. Implement the
- <A HREF="../../../com/google/tts/TextToSpeechBeta.OnInitListener.html" title="interface in com.google.tts"><CODE>TextToSpeechBeta.OnInitListener</CODE></A> to be notified of the completion of
- the initialization.<br>
- When you are done using the TextToSpeech instance, call the
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#shutdown()"><CODE>shutdown()</CODE></A> method to release the native resources used by the
- TextToSpeech engine.
- <P>
-
- <P>
- <HR>
-
- <P>
- <!-- ======== NESTED CLASS SUMMARY ======== -->
-
- <A NAME="nested_class_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Nested Class Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html" title="class in com.google.tts">TextToSpeechBeta.Engine</A></B></CODE>
-
- <BR>
- Internal constants for the TextToSpeech functionality</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static interface</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.OnInitListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnInitListener</A></B></CODE>
-
- <BR>
- Interface definition of a callback to be invoked indicating the completion
- of the TextToSpeech engine initialization.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static interface</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.OnUtteranceCompletedListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnUtteranceCompletedListener</A></B></CODE>
-
- <BR>
- Interface definition of a callback to be invoked indicating the
- TextToSpeech engine has completed synthesizing an utterance with an
- utterance ID set.</TD>
- </TR>
- </TABLE>
- <!-- =========== FIELD SUMMARY =========== -->
-
- <A NAME="field_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Field Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#ACTION_TTS_QUEUE_PROCESSING_COMPLETED">ACTION_TTS_QUEUE_PROCESSING_COMPLETED</A></B></CODE>
-
- <BR>
- Broadcast Action: The TextToSpeech synthesizer has completed processing of
- all the text in the speech queue.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR">ERROR</A></B></CODE>
-
- <BR>
- Denotes a generic operation failure.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_AVAILABLE">LANG_AVAILABLE</A></B></CODE>
-
- <BR>
- Denotes the language is available for the language by the locale, but not
- the country and variant.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_AVAILABLE">LANG_COUNTRY_AVAILABLE</A></B></CODE>
-
- <BR>
- Denotes the language is available for the language and country specified by
- the locale, but not the variant.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_VAR_AVAILABLE">LANG_COUNTRY_VAR_AVAILABLE</A></B></CODE>
-
- <BR>
- Denotes the language is available exactly as specified by the locale.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_MISSING_DATA">LANG_MISSING_DATA</A></B></CODE>
-
- <BR>
- Denotes the language data is missing.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_NOT_SUPPORTED">LANG_NOT_SUPPORTED</A></B></CODE>
-
- <BR>
- Denotes the language is not supported.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#NOT_ON_PLATFORM_TTS">NOT_ON_PLATFORM_TTS</A></B></CODE>
-
- <BR>
- </TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_ADD">QUEUE_ADD</A></B></CODE>
-
- <BR>
- Queue mode where the new entry is added at the end of the playback queue.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_FLUSH">QUEUE_FLUSH</A></B></CODE>
-
- <BR>
- Queue mode where all entries in the playback queue (media to be played and
- text to be synthesized) are dropped and replaced by the new entry.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS">SUCCESS</A></B></CODE>
-
- <BR>
- Denotes a successful operation.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#USING_PLATFORM_TTS">USING_PLATFORM_TTS</A></B></CODE>
-
- <BR>
- </TD>
- </TR>
- </TABLE>
-
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
-
- <A NAME="constructor_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Constructor Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#TextToSpeechBeta(Context, com.google.tts.TextToSpeechBeta.OnInitListener)">TextToSpeechBeta</A></B>(Context context,
- <A HREF="../../../com/google/tts/TextToSpeechBeta.OnInitListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnInitListener</A> listener)</CODE>
-
- <BR>
- The constructor for the TextToSpeech class.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
-
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#addEarcon(java.lang.String, java.lang.String)">addEarcon</A></B>(java.lang.String earcon,
- java.lang.String filename)</CODE>
-
- <BR>
- Adds a mapping between a string of text and a sound file.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#addEarcon(java.lang.String, java.lang.String, int)">addEarcon</A></B>(java.lang.String earcon,
- java.lang.String packagename,
- int resourceId)</CODE>
-
- <BR>
- Adds a mapping between a string of text and a sound resource in a package.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#addSpeech(java.lang.String, java.lang.String)">addSpeech</A></B>(java.lang.String text,
- java.lang.String filename)</CODE>
-
- <BR>
- Adds a mapping between a string of text and a sound file.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#addSpeech(java.lang.String, java.lang.String, int)">addSpeech</A></B>(java.lang.String text,
- java.lang.String packagename,
- int resourceId)</CODE>
-
- <BR>
- Adds a mapping between a string of text and a sound resource in a package.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> java.util.Locale</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#getLanguage()">getLanguage</A></B>()</CODE>
-
- <BR>
- Returns a Locale instance describing the language currently being used by
- the TextToSpeech engine.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#isInstalled(Context)">isInstalled</A></B>(Context ctx)</CODE>
-
- <BR>
- Standalone TTS ONLY!
-
- Checks if the TTS service is installed or not</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#isLanguageAvailable(java.util.Locale)">isLanguageAvailable</A></B>(java.util.Locale loc)</CODE>
-
- <BR>
- Checks if the specified language as represented by the Locale is available
- and supported.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#isSpeaking()">isSpeaking</A></B>()</CODE>
-
- <BR>
- Returns whether or not the TextToSpeech engine is busy speaking.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#playEarcon(java.lang.String, int, java.util.HashMap)">playEarcon</A></B>(java.lang.String earcon,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</CODE>
-
- <BR>
- Plays the earcon using the specified queueing mode and parameters.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#playSilence(long, int, java.util.HashMap)">playSilence</A></B>(long durationInMs,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</CODE>
-
- <BR>
- Plays silence for the specified amount of time using the specified queue
- mode.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#setLanguage(java.util.Locale)">setLanguage</A></B>(java.util.Locale loc)</CODE>
-
- <BR>
- Sets the language for the TextToSpeech engine.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#setOnUtteranceCompletedListener(com.google.tts.TextToSpeechBeta.OnUtteranceCompletedListener)">setOnUtteranceCompletedListener</A></B>(<A HREF="../../../com/google/tts/TextToSpeechBeta.OnUtteranceCompletedListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnUtteranceCompletedListener</A> listener)</CODE>
-
- <BR>
- Sets the OnUtteranceCompletedListener that will fire when an utterance
- completes.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#setPitch(float)">setPitch</A></B>(float pitch)</CODE>
-
- <BR>
- Sets the speech pitch for the TextToSpeech engine.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#setSpeechRate(float)">setSpeechRate</A></B>(float speechRate)</CODE>
-
- <BR>
- Sets the speech rate for the TextToSpeech engine.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#shutdown()">shutdown</A></B>()</CODE>
-
- <BR>
- Releases the resources used by the TextToSpeech engine.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#speak(java.lang.String, int, java.util.HashMap)">speak</A></B>(java.lang.String text,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</CODE>
-
- <BR>
- Speaks the string using the specified queuing strategy and speech
- parameters.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#stop()">stop</A></B>()</CODE>
-
- <BR>
- Interrupts the current utterance (whether played or rendered to file) and
- discards other utterances in the queue.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/google/tts/TextToSpeechBeta.html#synthesizeToFile(java.lang.String, java.util.HashMap, java.lang.String)">synthesizeToFile</A></B>(java.lang.String text,
- java.util.HashMap<java.lang.String,java.lang.String> params,
- java.lang.String filename)</CODE>
-
- <BR>
- Synthesizes the given text to a file using the specified parameters.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
- </TR>
- </TABLE>
-
- <P>
-
- <!-- ============ FIELD DETAIL =========== -->
-
- <A NAME="field_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Field Detail</B></FONT></TH>
- </TR>
- </TABLE>
-
- <A NAME="USING_PLATFORM_TTS"><!-- --></A><H3>
- USING_PLATFORM_TTS</H3>
- <PRE>
- public static final java.lang.String <B>USING_PLATFORM_TTS</B></PRE>
- <DL>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.USING_PLATFORM_TTS">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="NOT_ON_PLATFORM_TTS"><!-- --></A><H3>
- NOT_ON_PLATFORM_TTS</H3>
- <PRE>
- public static final java.lang.String <B>NOT_ON_PLATFORM_TTS</B></PRE>
- <DL>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.NOT_ON_PLATFORM_TTS">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="SUCCESS"><!-- --></A><H3>
- SUCCESS</H3>
- <PRE>
- public static final int <B>SUCCESS</B></PRE>
- <DL>
- <DD>Denotes a successful operation.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.SUCCESS">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="ERROR"><!-- --></A><H3>
- ERROR</H3>
- <PRE>
- public static final int <B>ERROR</B></PRE>
- <DL>
- <DD>Denotes a generic operation failure.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.ERROR">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="QUEUE_FLUSH"><!-- --></A><H3>
- QUEUE_FLUSH</H3>
- <PRE>
- public static final int <B>QUEUE_FLUSH</B></PRE>
- <DL>
- <DD>Queue mode where all entries in the playback queue (media to be played and
- text to be synthesized) are dropped and replaced by the new entry.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.QUEUE_FLUSH">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="QUEUE_ADD"><!-- --></A><H3>
- QUEUE_ADD</H3>
- <PRE>
- public static final int <B>QUEUE_ADD</B></PRE>
- <DL>
- <DD>Queue mode where the new entry is added at the end of the playback queue.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.QUEUE_ADD">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="LANG_COUNTRY_VAR_AVAILABLE"><!-- --></A><H3>
- LANG_COUNTRY_VAR_AVAILABLE</H3>
- <PRE>
- public static final int <B>LANG_COUNTRY_VAR_AVAILABLE</B></PRE>
- <DL>
- <DD>Denotes the language is available exactly as specified by the locale.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.LANG_COUNTRY_VAR_AVAILABLE">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="LANG_COUNTRY_AVAILABLE"><!-- --></A><H3>
- LANG_COUNTRY_AVAILABLE</H3>
- <PRE>
- public static final int <B>LANG_COUNTRY_AVAILABLE</B></PRE>
- <DL>
- <DD>Denotes the language is available for the language and country specified by
- the locale, but not the variant.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.LANG_COUNTRY_AVAILABLE">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="LANG_AVAILABLE"><!-- --></A><H3>
- LANG_AVAILABLE</H3>
- <PRE>
- public static final int <B>LANG_AVAILABLE</B></PRE>
- <DL>
- <DD>Denotes the language is available for the language by the locale, but not
- the country and variant.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.LANG_AVAILABLE">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="LANG_MISSING_DATA"><!-- --></A><H3>
- LANG_MISSING_DATA</H3>
- <PRE>
- public static final int <B>LANG_MISSING_DATA</B></PRE>
- <DL>
- <DD>Denotes the language data is missing.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.LANG_MISSING_DATA">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="LANG_NOT_SUPPORTED"><!-- --></A><H3>
- LANG_NOT_SUPPORTED</H3>
- <PRE>
- public static final int <B>LANG_NOT_SUPPORTED</B></PRE>
- <DL>
- <DD>Denotes the language is not supported.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.LANG_NOT_SUPPORTED">Constant Field Values</A></DL>
- </DL>
- <HR>
-
- <A NAME="ACTION_TTS_QUEUE_PROCESSING_COMPLETED"><!-- --></A><H3>
- ACTION_TTS_QUEUE_PROCESSING_COMPLETED</H3>
- <PRE>
- public static final java.lang.String <B>ACTION_TTS_QUEUE_PROCESSING_COMPLETED</B></PRE>
- <DL>
- <DD>Broadcast Action: The TextToSpeech synthesizer has completed processing of
- all the text in the speech queue.
- <P>
- <DL>
- <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.google.tts.TextToSpeechBeta.ACTION_TTS_QUEUE_PROCESSING_COMPLETED">Constant Field Values</A></DL>
- </DL>
-
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
-
- <A NAME="constructor_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Constructor Detail</B></FONT></TH>
- </TR>
- </TABLE>
-
- <A NAME="TextToSpeechBeta(Context, com.google.tts.TextToSpeechBeta.OnInitListener)"><!-- --></A><H3>
- TextToSpeechBeta</H3>
- <PRE>
- public <B>TextToSpeechBeta</B>(Context context,
- <A HREF="../../../com/google/tts/TextToSpeechBeta.OnInitListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnInitListener</A> listener)</PRE>
- <DL>
- <DD>The constructor for the TextToSpeech class. This will also initialize the
- associated TextToSpeech engine if it isn't already running.
- <P>
- <DL>
- <DT><B>Parameters:</B><DD><CODE>context</CODE> - The context this instance is running in.<DD><CODE>listener</CODE> - The <A HREF="../../../com/google/tts/TextToSpeechBeta.OnInitListener.html" title="interface in com.google.tts"><CODE>TextToSpeechBeta.OnInitListener</CODE></A> that will be
- called when the TextToSpeech engine has initialized.</DL>
- </DL>
-
- <!-- ============ METHOD DETAIL ========== -->
-
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TH>
- </TR>
- </TABLE>
-
- <A NAME="shutdown()"><!-- --></A><H3>
- shutdown</H3>
- <PRE>
- public void <B>shutdown</B>()</PRE>
- <DL>
- <DD>Releases the resources used by the TextToSpeech engine. It is good practice
- for instance to call this method in the onDestroy() method of an Activity
- so the TextToSpeech engine can be cleanly stopped.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="addSpeech(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
- addSpeech</H3>
- <PRE>
- public int <B>addSpeech</B>(java.lang.String text,
- java.lang.String packagename,
- int resourceId)</PRE>
- <DL>
- <DD>Adds a mapping between a string of text and a sound resource in a package.
- After a call to this method, subsequent calls to
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#speak(java.lang.String, int, java.util.HashMap)"><CODE>speak(String, int, HashMap)</CODE></A> will play the specified sound resource
- if it is available, or synthesize the text it is missing.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>text</CODE> - The string of text. Example: <code>"south_south_east"</code><DD><CODE>packagename</CODE> - Pass the packagename of the application that contains
- the resource. If the resource is in your own application (this is
- the most common case), then put the packagename of your application
- here.<br/>
- Example: <b>"com.google.marvin.compass"</b><br/>
- The packagename can be found in the AndroidManifest.xml of your
- application.
- <p>
- <code><manifest xmlns:android="..."
- package="<b>com.google.marvin.compass</b>"></code>
- </p><DD><CODE>resourceId</CODE> - Example: <code>R.raw.south_south_east</code>
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="addSpeech(java.lang.String, java.lang.String)"><!-- --></A><H3>
- addSpeech</H3>
- <PRE>
- public int <B>addSpeech</B>(java.lang.String text,
- java.lang.String filename)</PRE>
- <DL>
- <DD>Adds a mapping between a string of text and a sound file. Using this, it is
- possible to add custom pronounciations for a string of text. After a call
- to this method, subsequent calls to <A HREF="../../../com/google/tts/TextToSpeechBeta.html#speak(java.lang.String, int, java.util.HashMap)"><CODE>speak(String, int, HashMap)</CODE></A>
- will play the specified sound resource if it is available, or synthesize
- the text it is missing.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>text</CODE> - The string of text. Example: <code>"south_south_east"</code><DD><CODE>filename</CODE> - The full path to the sound file (for example:
- "/sdcard/mysounds/hello.wav")
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="addEarcon(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
- addEarcon</H3>
- <PRE>
- public int <B>addEarcon</B>(java.lang.String earcon,
- java.lang.String packagename,
- int resourceId)</PRE>
- <DL>
- <DD>Adds a mapping between a string of text and a sound resource in a package.
- Use this to add custom earcons.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>earcon</CODE> - The name of the earcon. Example: <code>"[tick]"</code><br/><DD><CODE>packagename</CODE> - the package name of the application that contains the
- resource. This can for instance be the package name of your own
- application. Example: <b>"com.google.marvin.compass"</b><br/>
- The package name can be found in the AndroidManifest.xml of the
- application containing the resource.
- <p>
- <code><manifest xmlns:android="..."
- package="<b>com.google.marvin.compass</b>"></code>
- </p><DD><CODE>resourceId</CODE> - Example: <code>R.raw.tick_snd</code>
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.<DT><B>See Also:</B><DD><A HREF="../../../com/google/tts/TextToSpeechBeta.html#playEarcon(java.lang.String, int, java.util.HashMap)"><CODE>playEarcon(String, int, HashMap)</CODE></A></DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="addEarcon(java.lang.String, java.lang.String)"><!-- --></A><H3>
- addEarcon</H3>
- <PRE>
- public int <B>addEarcon</B>(java.lang.String earcon,
- java.lang.String filename)</PRE>
- <DL>
- <DD>Adds a mapping between a string of text and a sound file. Use this to add
- custom earcons.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>earcon</CODE> - The name of the earcon. Example: <code>"[tick]"</code><DD><CODE>filename</CODE> - The full path to the sound file (for example:
- "/sdcard/mysounds/tick.wav")
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.<DT><B>See Also:</B><DD><A HREF="../../../com/google/tts/TextToSpeechBeta.html#playEarcon(java.lang.String, int, java.util.HashMap)"><CODE>playEarcon(String, int, HashMap)</CODE></A></DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="speak(java.lang.String, int, java.util.HashMap)"><!-- --></A><H3>
- speak</H3>
- <PRE>
- public int <B>speak</B>(java.lang.String text,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</PRE>
- <DL>
- <DD>Speaks the string using the specified queuing strategy and speech
- parameters.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>text</CODE> - The string of text to be spoken.<DD><CODE>queueMode</CODE> - The queuing strategy to use. <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_ADD"><CODE>QUEUE_ADD</CODE></A> or
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_FLUSH"><CODE>QUEUE_FLUSH</CODE></A>.<DD><CODE>params</CODE> - The list of parameters to be used. Can be null if no
- parameters are given. They are specified using a (key, value) pair,
- where the key can be <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_STREAM"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_STREAM</CODE></A> or
- <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_UTTERANCE_ID"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_UTTERANCE_ID</CODE></A>.
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="playEarcon(java.lang.String, int, java.util.HashMap)"><!-- --></A><H3>
- playEarcon</H3>
- <PRE>
- public int <B>playEarcon</B>(java.lang.String earcon,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</PRE>
- <DL>
- <DD>Plays the earcon using the specified queueing mode and parameters.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>earcon</CODE> - The earcon that should be played<DD><CODE>queueMode</CODE> - <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_ADD"><CODE>QUEUE_ADD</CODE></A> or <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_FLUSH"><CODE>QUEUE_FLUSH</CODE></A>.<DD><CODE>params</CODE> - The list of parameters to be used. Can be null if no
- parameters are given. They are specified using a (key, value) pair,
- where the key can be <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_STREAM"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_STREAM</CODE></A> or
- <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_UTTERANCE_ID"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_UTTERANCE_ID</CODE></A>.
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="playSilence(long, int, java.util.HashMap)"><!-- --></A><H3>
- playSilence</H3>
- <PRE>
- public int <B>playSilence</B>(long durationInMs,
- int queueMode,
- java.util.HashMap<java.lang.String,java.lang.String> params)</PRE>
- <DL>
- <DD>Plays silence for the specified amount of time using the specified queue
- mode.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>durationInMs</CODE> - A long that indicates how long the silence should last.<DD><CODE>queueMode</CODE> - <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_ADD"><CODE>QUEUE_ADD</CODE></A> or <A HREF="../../../com/google/tts/TextToSpeechBeta.html#QUEUE_FLUSH"><CODE>QUEUE_FLUSH</CODE></A>.<DD><CODE>params</CODE> - The list of parameters to be used. Can be null if no
- parameters are given. They are specified using a (key, value) pair,
- where the key can be <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_UTTERANCE_ID"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_UTTERANCE_ID</CODE></A>.
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="isSpeaking()"><!-- --></A><H3>
- isSpeaking</H3>
- <PRE>
- public boolean <B>isSpeaking</B>()</PRE>
- <DL>
- <DD>Returns whether or not the TextToSpeech engine is busy speaking.
- <P>
- <DD><DL>
-
- <DT><B>Returns:</B><DD>Whether or not the TextToSpeech engine is busy speaking.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="stop()"><!-- --></A><H3>
- stop</H3>
- <PRE>
- public int <B>stop</B>()</PRE>
- <DL>
- <DD>Interrupts the current utterance (whether played or rendered to file) and
- discards other utterances in the queue.
- <P>
- <DD><DL>
-
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="setSpeechRate(float)"><!-- --></A><H3>
- setSpeechRate</H3>
- <PRE>
- public int <B>setSpeechRate</B>(float speechRate)</PRE>
- <DL>
- <DD>Sets the speech rate for the TextToSpeech engine.
-
- This has no effect on any pre-recorded speech.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>speechRate</CODE> - The speech rate for the TextToSpeech engine. 1 is the
- normal speed, lower values slow down the speech (0.5 is half the
- normal speech rate), greater values accelerate it (2 is twice the
- normal speech rate).
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="setPitch(float)"><!-- --></A><H3>
- setPitch</H3>
- <PRE>
- public int <B>setPitch</B>(float pitch)</PRE>
- <DL>
- <DD>Sets the speech pitch for the TextToSpeech engine.
-
- This has no effect on any pre-recorded speech.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>pitch</CODE> - The pitch for the TextToSpeech engine. 1 is the normal pitch,
- lower values lower the tone of the synthesized voice, greater values
- increase it.
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="setLanguage(java.util.Locale)"><!-- --></A><H3>
- setLanguage</H3>
- <PRE>
- public int <B>setLanguage</B>(java.util.Locale loc)</PRE>
- <DL>
- <DD>Sets the language for the TextToSpeech engine. The TextToSpeech engine will
- try to use the closest match to the specified language as represented by
- the Locale, but there is no guarantee that the exact same Locale will be
- used. Use <A HREF="../../../com/google/tts/TextToSpeechBeta.html#isLanguageAvailable(java.util.Locale)"><CODE>isLanguageAvailable(Locale)</CODE></A> to check the level of
- support before choosing the language to use for the next utterances.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>loc</CODE> - The locale describing the language to be used.
- <DT><B>Returns:</B><DD>code indicating the support status for the locale. See
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_AVAILABLE"><CODE>LANG_AVAILABLE</CODE></A>, <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_AVAILABLE"><CODE>LANG_COUNTRY_AVAILABLE</CODE></A>,
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_VAR_AVAILABLE"><CODE>LANG_COUNTRY_VAR_AVAILABLE</CODE></A>, <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_MISSING_DATA"><CODE>LANG_MISSING_DATA</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_NOT_SUPPORTED"><CODE>LANG_NOT_SUPPORTED</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="getLanguage()"><!-- --></A><H3>
- getLanguage</H3>
- <PRE>
- public java.util.Locale <B>getLanguage</B>()</PRE>
- <DL>
- <DD>Returns a Locale instance describing the language currently being used by
- the TextToSpeech engine.
- <P>
- <DD><DL>
-
- <DT><B>Returns:</B><DD>language, country (if any) and variant (if any) used by the engine
- stored in a Locale instance, or null is the TextToSpeech engine has
- failed.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="isLanguageAvailable(java.util.Locale)"><!-- --></A><H3>
- isLanguageAvailable</H3>
- <PRE>
- public int <B>isLanguageAvailable</B>(java.util.Locale loc)</PRE>
- <DL>
- <DD>Checks if the specified language as represented by the Locale is available
- and supported.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>loc</CODE> - The Locale describing the language to be used.
- <DT><B>Returns:</B><DD>code indicating the support status for the locale. See
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_AVAILABLE"><CODE>LANG_AVAILABLE</CODE></A>, <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_AVAILABLE"><CODE>LANG_COUNTRY_AVAILABLE</CODE></A>,
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_COUNTRY_VAR_AVAILABLE"><CODE>LANG_COUNTRY_VAR_AVAILABLE</CODE></A>, <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_MISSING_DATA"><CODE>LANG_MISSING_DATA</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#LANG_NOT_SUPPORTED"><CODE>LANG_NOT_SUPPORTED</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="synthesizeToFile(java.lang.String, java.util.HashMap, java.lang.String)"><!-- --></A><H3>
- synthesizeToFile</H3>
- <PRE>
- public int <B>synthesizeToFile</B>(java.lang.String text,
- java.util.HashMap<java.lang.String,java.lang.String> params,
- java.lang.String filename)</PRE>
- <DL>
- <DD>Synthesizes the given text to a file using the specified parameters.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>text</CODE> - The String of text that should be synthesized<DD><CODE>params</CODE> - The list of parameters to be used. Can be null if no
- parameters are given. They are specified using a (key, value) pair,
- where the key can be <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html#KEY_PARAM_UTTERANCE_ID"><CODE>TextToSpeechBeta.Engine.KEY_PARAM_UTTERANCE_ID</CODE></A>.<DD><CODE>filename</CODE> - The string that gives the full output filename; it should
- be something like "/sdcard/myappsounds/mysound.wav".
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="setOnUtteranceCompletedListener(com.google.tts.TextToSpeechBeta.OnUtteranceCompletedListener)"><!-- --></A><H3>
- setOnUtteranceCompletedListener</H3>
- <PRE>
- public int <B>setOnUtteranceCompletedListener</B>(<A HREF="../../../com/google/tts/TextToSpeechBeta.OnUtteranceCompletedListener.html" title="interface in com.google.tts">TextToSpeechBeta.OnUtteranceCompletedListener</A> listener)</PRE>
- <DL>
- <DD>Sets the OnUtteranceCompletedListener that will fire when an utterance
- completes.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>listener</CODE> - The OnUtteranceCompletedListener
- <DT><B>Returns:</B><DD>Code indicating success or failure. See <A HREF="../../../com/google/tts/TextToSpeechBeta.html#ERROR"><CODE>ERROR</CODE></A> and
- <A HREF="../../../com/google/tts/TextToSpeechBeta.html#SUCCESS"><CODE>SUCCESS</CODE></A>.</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="isInstalled(Context)"><!-- --></A><H3>
- isInstalled</H3>
- <PRE>
- public static boolean <B>isInstalled</B>(Context ctx)</PRE>
- <DL>
- <DD>Standalone TTS ONLY!
-
- Checks if the TTS service is installed or not
- <P>
- <DD><DL>
-
- <DT><B>Returns:</B><DD>A boolean that indicates whether the TTS service is installed</DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
-
-
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/google/tts/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
- <A HREF="../../../com/google/tts/TextToSpeechBeta.Engine.html" title="class in com.google.tts"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../index.html?com/google/tts/TextToSpeechBeta.html" target="_top"><B>FRAMES</B></A>
- <A HREF="TextToSpeechBeta.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
-
- <HR>
-
- </BODY>
- </HTML>