关键字:
transformNative_libsWithStripDebugSymbolForDebug、
没有匹配的识别结果、
点击重试也无法打开识别
百度语音离在线融合SDK下载
版本:2.1.21
发布时间:2017-1-17
下载后得到bd_speech_sdk_asr_v2.1.21.20170112_3ad14de_beta.zip 15.65MB
解压得到以下文件

Eclipse直接导入并运行成功
demo是Eclipse开发的,直接通过Eclipse的import是可以直接运行的

选择后直接点Finish即可编译运行到手机上体验语音识别功能。
导入Android studio需要注意一些问题
方式一: 导入工程方式
如果你是直接导入工程,应该会提示错误如下
Error:Application and test application id cannot be the same: both are 'com.baidu.speech.recognizerdemo' for debugAndroidTest

修改上图的错误就好了,修改后如下图

这样基本就可以使用了。
方式二:在你的工程中导入百度Demo model
这种方式坑就比较多了
- 开始导入model,如下图,点击下一步→下一步→finish

同样,也报了一个错误
Error:Application and test application id cannot be the same: both are 'com.baidu.speech.recognizerdemo' for debugAndroidTest
解决办法上面已经说了,注释掉model级别的build.gradle里两行代码,修改几个地方即可
defaultConfig {
applicationId "com.baidu.speech.recognizerdemo"
minSdkVersion 15
targetSdkVersion 21
// testApplicationId "com.baidu.speech.recognizerdemo"
// testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
sync结束后就可以运行model了
小问题
如果你的model还出现奇怪的问题,比如直接弹出提示Cmake和ndk-build或者一开始说的出现“没有匹配的识别结果”,那是因为导入的model运行了,但是并没有执行到armeabia库

解决办法
图5,修改compileSdkVersion、buildToolsVersion、targetSdkVersion、 compile 'com.android.support:support-v4:x.x.x'为正确的参数
网友评论