Add EXTRA_PARTIAL_RESULTS so that clients can enable receiving results via onPartialResults()

This commit is contained in:
Alex Gruenstein
2010-02-09 14:36:42 -08:00
parent 4eaef139cf
commit cc47fae688
3 changed files with 22 additions and 2 deletions

View File

@@ -135940,6 +135940,17 @@
visibility="public"
>
</field>
<field name="EXTRA_PARTIAL_RESULTS"
type="java.lang.String"
transient="false"
volatile="false"
value="&quot;android.speech.extra.PARTIAL_RESULTS&quot;"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="EXTRA_PROMPT"
type="java.lang.String"
transient="false"
@@ -210277,7 +210288,7 @@
deprecated="not deprecated"
visibility="public"
>
<parameter name="arg0" type="T">
<parameter name="t" type="T">
</parameter>
</method>
</interface>

View File

@@ -79,7 +79,8 @@ public interface RecognitionListener {
* time between {@link #onBeginningOfSpeech()} and {@link #onResults(Bundle)} when partial
* results are ready. This method may be called zero, one or multiple times for each call to
* {@link RecognitionManager#startListening(Intent)}, depending on the speech recognition
* service implementation.
* service implementation. To request partial results, use
* {@link RecognizerIntent#EXTRA_PARTIAL_RESULTS}
*
* @param partialResults the returned results. To retrieve the results in
* ArrayList&lt;String&gt; format use {@link Bundle#getStringArrayList(String)} with

View File

@@ -77,6 +77,7 @@ public class RecognizerIntent {
* <li>{@link #EXTRA_PROMPT}
* <li>{@link #EXTRA_LANGUAGE}
* <li>{@link #EXTRA_MAX_RESULTS}
* <li>{@link #EXTRA_PARTIAL_RESULTS}
* </ul>
*
* <p> Result extras (returned in the result, not to be specified in the request):
@@ -165,6 +166,13 @@ public class RecognizerIntent {
*/
public static final String EXTRA_MAX_RESULTS = "android.speech.extra.MAX_RESULTS";
/**
* Optional boolean to indicate whether partial results should be returned by the recognizer
* as the user speaks (default is false). The server may ignore a request for partial
* results in some or all cases.
*/
public static final String EXTRA_PARTIAL_RESULTS = "android.speech.extra.PARTIAL_RESULTS";
/**
* When the intent is {@link #ACTION_RECOGNIZE_SPEECH}, the speech input activity will
* return results to you via the activity results mechanism. Alternatively, if you use this