类 AICloudASREngine


  • public class AICloudASREngine
    extends java.lang.Object
    云端识别引擎
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static java.lang.String TAG  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void cancel()
      取消本次识别操作
      static AICloudASREngine createInstance()
      创建实例
      void destroy()
      销毁云端识别引擎
      void feedData​(byte[] data, int size)
      传入数据,在不使用SDK录音机时调用
      BaseProcessor.EngineState getCurrentState()
      获取当前的引擎状态
      void init​(AICloudASRConfig config, AIASRListener listener)
      初始化云端识别引擎
      void notifyWakeup()
      告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词
      protected void setLasrInfo​(java.lang.String lasrRealtimeParam, java.lang.String lasrRes, java.lang.String lasrForwardAddresses)
      提供给实时长语音引擎使用
      void start​(AICloudASRIntent aICloudASRIntent)
      启动录音,开始语音识别
      void stop()
      停止录音,等待识别结果
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • TAG

        public static final java.lang.String TAG
        另请参阅:
        常量字段值
    • 方法详细资料

      • createInstance

        public static AICloudASREngine createInstance()
        创建实例
        返回:
        AICloudASREngine实例
      • init

        public void init​(AICloudASRConfig config,
                         AIASRListener listener)
        初始化云端识别引擎
        参数:
        config - 配置
        listener - 回调接口
      • start

        public void start​(AICloudASRIntent aICloudASRIntent)
        启动录音,开始语音识别
        参数:
        aICloudASRIntent - 参数
      • setLasrInfo

        protected void setLasrInfo​(java.lang.String lasrRealtimeParam,
                                   java.lang.String lasrRes,
                                   java.lang.String lasrForwardAddresses)
        提供给实时长语音引擎使用
        参数:
        lasrRealtimeParam - lasrRealtimeParam
        lasrRes - lasrRes
        lasrForwardAddresses - lasrForwardAddresses
      • stop

        public void stop()
        停止录音,等待识别结果
      • feedData

        public void feedData​(byte[] data,
                             int size)
        传入数据,在不使用SDK录音机时调用
        参数:
        data - 音频数据流
        size - 音频数据大小
        另请参阅:
        AICloudASRIntent.setUseCustomFeed(boolean)
      • cancel

        public void cancel()
        取消本次识别操作
      • destroy

        public void destroy()
        销毁云端识别引擎
      • notifyWakeup

        public void notifyWakeup()
        告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词

        请参考 oneshot demo 中的使用方法