com.googlecode.android_scripting.facade
Class SpeechRecognitionFacade

java.lang.Object
  extended by com.googlecode.android_scripting.jsonrpc.RpcReceiver
      extended by com.googlecode.android_scripting.facade.SpeechRecognitionFacade

public class SpeechRecognitionFacade
extends RpcReceiver

A facade containing RPC implementations related to the speech-to-text functionality of Android.

Author:
Felix Arends (felix.arends@gmail.com)

Constructor Summary
SpeechRecognitionFacade(FacadeManager manager)
           
 
Method Summary
 java.lang.String recognizeSpeech(java.lang.String prompt, java.lang.String language, java.lang.String languageModel)
           
 void shutdown()
          Invoked when the receiver is shut down.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpeechRecognitionFacade

public SpeechRecognitionFacade(FacadeManager manager)
Parameters:
activityLauncher - a helper object that launches activities in a blocking manner
Method Detail

recognizeSpeech

@Rpc(description="Recognizes user\'s speech and returns the most likely result.",
     returns="An empty string in case the speech cannot be recongnized.")
public java.lang.String recognizeSpeech(@RpcParameter(name="prompt",description="text prompt to show to the user when asking them to speak")@RpcOptional
                                                              java.lang.String prompt,
                                                              @RpcParameter(name="language",description="language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault()")@RpcOptional
                                                              java.lang.String language,
                                                              @RpcParameter(name="languageModel",description="informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent)")@RpcOptional
                                                              java.lang.String languageModel)

shutdown

public void shutdown()
Description copied from class: RpcReceiver
Invoked when the receiver is shut down.

Specified by:
shutdown in class RpcReceiver