Baidu Speech Recognition (Voice) Android Studio version
Synchronized update to personal blog:http://dxjia.cn/2016/02/29/baidu-voice-helper/
Recently in a practicing small project to use speech recognition, search for a bit, more easily integrated even if the Baidu voice with the voice of the fly, Baidu provides a direct use of the display control, and the need to realize the fly, in addition to Baidu to provide 5W times a day call frequency, Enough for me to use. So choose to use Baidu Voice (control will have Baidu logo and keywords, so the formal use of products to be considered).
Looking at the Android SDK provided by Baidu, or the Eclipse era, if you want to use his controls, you need to integrate his resource files into your engineering directory, and you'll need to add permissions and activity to the Androidmanifest.xml, Service statements, and so on, some cumbersome, and these files are mixed in your project, a little messy.
In addition, there is a point, the control provided by Baidu must set up their own beep files, not set, the SDK will report null point error.
Intent.putextra (Extra_sound_start, r.raw.bdspeech_recognition_start);
Intent.putextra (Extra_sound_end, r.raw.bdspeech_speech_end);
Intent.putextra (extra_sound_success, r.raw.bdspeech_recognition_success);
Intent.putextra (Extra_sound_error, r.raw.bdspeech_recognition_error);
Intent.putextra (Extra_sound_cancel, R.raw.bdspeech_recognition_cancel);
This is also because the current SDK jar does not contain the res file itself, so based on this, I ported his SDK to Android studio and packaged the resource files and jar so files into an AAR file. And also provides an interface file (only a few interfaces, to invoke the control), the development of the API method can also use this AAR package, because it contains the internal Baidu jar package, so Baidu's API can be referred to.
Library sharing on the GitHub, you can refer to the use of the README.
Https://github.com/dxjia/BaiduVoiceHelper
The above is to Baidu speech recognition of data collation, follow-up continue to supplement the relevant information, thank you for your support of this site!