我使用的服务是:百度语音识别
调用的接口是:
参数设置情况:根据demo设置
开发平台和机型:Android HUAWEI SCL-TL00H
SDK版本号:bd_speech_sdk_asr_v2.1.21.20170112_3ad14de_beta
代码或日志截图(上传截图能帮助您更快解决问题):
复现步骤、现象及其他描述:
在HUAWEI 6P上是可以使用的
07-06 16:13:12.387 V/AudioManager: playSoundEffect effectType: 0
07-06 16:13:12.387 V/AudioManager: querySoundEffectsEnabled...
07-06 16:13:12.467 D/Device: read deviceID:349AA6B67F9F839CCFDF731DC0B9743A|945249720043968
07-06 16:13:12.467 W/System.err: java.lang.UnsupportedOperationException: easr not found!
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerVadModule$ModelVad.(EventManagerVadModule.java:31)
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerVadModule.(EventManagerVadModule.java:22)
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerVadModule.(EventManagerVadModule.java:18)
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerAsr.handleAsrStart(EventManagerAsr.java:510)
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerAsr.send(EventManagerAsr.java:265)
07-06 16:13:12.467 W/System.err: at com.baidu.speech.EventManagerMessagePool$1.run(EventManagerMessagePool.java:56)
07-06 16:13:12.467 W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
07-06 16:13:12.467 W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
07-06 16:13:12.467 W/System.err: at android.os.Looper.loop(Looper.java:135)
07-06 16:13:12.467 W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
07-06 16:13:12.477 D/HwCust: Create obj success use class android.media.HwCustMediaPlayerImpl
07-06 16:13:12.477 E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
07-06 16:13:12.507 E/MediaPlayer: Should have subtitle controller already set
07-06 16:13:12.517 D/MediaPlayer: [HSM] MediaPlayer start() uid: 10188, pid: 4869
07-06 16:13:12.527 D/AudioRecordPermission: AudioRecordPermission
07-06 16:13:12.537 D/StubController: holdAndGetPermissionType permissionType:128 uid:10188 pid:4869
07-06 16:13:12.537 D/StubController: addRequestCount, mRequestCount =1 mPhoneIDRequestCount: 0 mLocationRequestCount: 0 permissionType is: 128
07-06 16:13:12.537 D/StubController: holdForGetPermissionSelection mRequestCount:1
07-06 16:13:12.547 D/StubController: beforeShowDialogCheckResult:1
07-06 16:13:12.547 D/StubController: minusRequestCount, mRequestCount =0 mPhoneIDRequestCount: 0 mLocationRequestCount: 0 permissionType is: 128
07-06 16:13:12.547 I/AudioRecordPermission: remindWithResult:false
07-06 16:13:12.677 I/MicrophoneInputStream: new instance(), sUsingCount=1, sInnerSourceInputStream=com.baidu.speech.MicrophoneInputStream$InnerSourceInputStream@76e3b28
07-06 16:13:12.677 E/MediaPlayer: Should have subtitle controller already set
07-06 16:13:12.857 I/MicrophoneInputStream: close(), sUsingCount=0, sInnerSourceInputStream=null
rdc@choworld.cn:
百度语音识别CPU架构支持官方demo只支持armeabi和arm64-v8a
因项目需要还引用了别的开源库,不巧的是这些库比百度语音识别多支持几个CPU架构()
解决办法:
在 build.gradle(app)defaultConfig添加以下内容过滤CPU架构(暂时还不知道会不会影响其它开源库的功能使用)
defaultConfig {
......
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'arm64-v8a'
// 还可以添加 ''armeabi-v7a', x86', 'x86_64', 'mips', 'mips64','armeabi-v8a'
}
}
回复rdc@choworld.cn:感谢您的分享。
百度语音识别CPU架构支持官方demo只支持armeabi和arm64-v8a
因项目需要还引用了别的开源库,不巧的是这些库比百度语音识别多支持几个CPU架构()
解决办法:
在 build.gradle(app)defaultConfig添加以下内容过滤CPU架构(暂时还不知道会不会影响其它开源库的功能使用)
defaultConfig {
......
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'arm64-v8a'
// 还可以添加 ''armeabi-v7a', x86', 'x86_64', 'mips', 'mips64','armeabi-v8a'
}
}