Detailed explanation of Baidu voice Android studio version

Baidu voice Android studio version

Synchronized updates to personal blog: http://dxjia.cn/2016/02/29/baidu-voice-helper/

Recently, speech recognition was used in a small hand training project. I searched it. It is easy to integrate. Even if Baidu voice and iFLYTEK voice, baidu provides a display control that can be used directly, and iFLYTEK needs to implement it by itself. In addition, baidu provides a call frequency of 5W times a day, which is enough for me. So I choose to use Baidu voice (the control will have Baidu logo and keywords, so the use of formal products should be considered).

After taking a look at the Android SDK provided by Baidu, it is still in the eclipse era. If you want to use its controls, you need to integrate its resource files into your own project directory, as well as in androidmanifest Adding permissions, activity and service declarations in XML is cumbersome, and these folders are mixed in your project, which is somewhat messy.

In addition, the control provided by Baidu must set the prompt sound file by itself. If it is not set, the SDK will report a null point error.

This is also because the current SDK jars cannot contain res files themselves. Therefore, based on this, I transplanted his SDK to Android studio, packaged these resource files and jar package so files into an AAR file, and provided an interface file (only a few interfaces are used to call controls). This AAR package can also be used for API development, Because it contains Baidu's jar package, Baidu's APIs can be referenced.

The library is shared on GitHub and can be used with reference to readme.

https://github.com/dxjia/BaiduVoiceHelper

The above is the data sorting of Baidu speech recognition. We will continue to supplement relevant data in the future. Thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>