百度语音识别 SDK Android 离在线融合版开发手册
第 2 页
目录
目录 ................................................................................................................................................................. 2
1 概念解释 ..................................................................................................................................................... 4
2 简介 ............................................................................................................................................................. 4
2.1 功能介绍 .......................................................................................................................................... 4
2.2 兼容性 .............................................................................................................................................. 4
2.3 开发包说明 ...................................................................................................................................... 5
2.4 总体框图 .......................................................................................................................................... 5
3 集成指南 ..................................................................................................................................................... 5
3.1 注册百度开发者 .............................................................................................................................. 5
3.2 创建应用 .......................................................................................................................................... 6
3.3 开通语音识别服务 .......................................................................................................................... 7
3.4 申请离线识别授权 .......................................................................................................................... 8
3.5 导入 SDK ........................................................................................................................................... 9
3.6 配置 manifest ................................................................................................................................. 9
3.7 权限声明 ........................................................................................................................................ 10
4 识别参数 ................................................................................................................................................... 11
5 语音识别控件 ........................................................................................................................................... 14
6 API 方式识别 ............................................................................................................................................. 15
6.1 语音识别器 .................................................................................................................................... 15
6.1.1 创建实例 ............................................................................................................................. 15
6.1.2 设置监听 ............................................................................................................................. 15
6.1.3 开始识别 ............................................................................................................................. 16
6.1.4 停止录音 ............................................................................................................................. 16
6.1.5 取消识别 ............................................................................................................................. 16
6.1.6 销毁 ..................................................................................................................................... 16
6.2 监听器 ............................................................................................................................................ 16
6.2.1 准备就绪 ............................................................................................................................. 16
6.2.2 开始说话 ............................................................................................................................. 16
6.2.3 音量变化 ............................................................................................................................. 17
6.2.4 原始语音 ............................................................................................................................. 17
6.2.5 说话结束 ............................................................................................................................. 17
6.2.6 识别出错 ............................................................................................................................. 17
6.2.7 识别结果 ............................................................................................................................. 17
6.2.8 临时结果 ............................................................................................................................. 17
6.2.9 识别事件 ............................................................................................................................. 17