ISpeechRecognizer

Xunfei Voice+



com.iflytek.speech.aidl 接口 ISpeechRecognizer

所有超级接口:
android.os.IInterface
所有已知实现类:
ISpeechRecognizer.Stub

public interface ISpeechRecognizer
extends android.os.IInterface

语音识别服务接口


嵌套类摘要
static class ISpeechRecognizer.Stub
          Local-side IPC implementation stub class.
 
方法摘要
 void buildGrammar(android.content.Intent intent, GrammarListener grammarListener)
          构建语法文件,生成语法ID
 void cancel(RecognizerListener listener)
          取消识别,不需要返回结果
 boolean isListening()
          是否正在识别
 void startListening(android.content.Intent intent, RecognizerListener listener)
          开始识别
 void stopListening(RecognizerListener listener)
          停止识别,立即返回结果
 void updateLexicon(android.content.Intent intent, LexiconListener lexiconListener)
          构建词典
 void writeAudio(android.content.Intent intent, byte[] buffer, int offset, int length)
          写入音频数据
 
从接口 android.os.IInterface 继承的方法
asBinder
 

方法详细信息

startListening

void startListening(android.content.Intent intent,
                    RecognizerListener listener)
                    throws android.os.RemoteException
开始识别

抛出:
android.os.RemoteException

stopListening

void stopListening(RecognizerListener listener)
                   throws android.os.RemoteException
停止识别,立即返回结果

抛出:
android.os.RemoteException

cancel

void cancel(RecognizerListener listener)
            throws android.os.RemoteException
取消识别,不需要返回结果

抛出:
android.os.RemoteException

isListening

boolean isListening()
                    throws android.os.RemoteException
是否正在识别

抛出:
android.os.RemoteException

buildGrammar

void buildGrammar(android.content.Intent intent,
                  GrammarListener grammarListener)
                  throws android.os.RemoteException
构建语法文件,生成语法ID

抛出:
android.os.RemoteException

updateLexicon

void updateLexicon(android.content.Intent intent,
                   LexiconListener lexiconListener)
                   throws android.os.RemoteException
构建词典

抛出:
android.os.RemoteException

writeAudio

void writeAudio(android.content.Intent intent,
                byte[] buffer,
                int offset,
                int length)
                throws android.os.RemoteException
写入音频数据

抛出:
android.os.RemoteException