Speech recognition technology Iflytek's recognition accuracy is one of the most, like some degree of disgusting home of the dog excrement, at best, is a decoration, the following introduction of the Iflytek voice integration.
1, to the Iflytek website http://www.xfyun.cn/Register the account and create the application and get Appkey, then download the demo and SDK, these steps are similar to the three-party interface access.
2, run a demo, first try the effect, see whether the speech recognition function is effective, first try hackers, check the accuracy of recognition, whether meet the requirements.
3, according to the demo to integrate the corresponding functions:
A, first copy the SDK, in the demo or download the Open source project found Sdk,msc.jar Sunflower.jar Armeabi These three, support-v4 of the package generally have, no words also copy a come over
B, copy permissions, open the speech recognition demo manifest file, the corresponding permissions are copied over
C, initialization of the application, note that many functions of speech recognition needs to be initialized, generally placed in the application, so note application has a name attribute, find this application file, the same copy to our project, and the name attribute of the application in its own project is also set to this Java class, note the package name
D, configuration Appkey, in the application file (Speechapp.java) just copied over there is a speechutility.createutility (Speechapp.this, "appid=" + GetString (r.string.app_id)); The following getString (r.string.app_id) need to fill in the application on the web side of the application Appkey, if your demo is downloaded after the application, in the demo Ctrl + back that can find the corresponding Appkey, Otherwise you replace yourself with the Appkey applied on the web side
E, in the demo to find the Start button corresponding to the code, copy, and then change the wrong, find code, copy paste paste copy paste
F, note there is another, is the demo inside the Assest directory there are some files to copy over, to have with the demo speech recognition effect
Good three-way interface, the package is particularly good, copy of the code is also less, Iflytek this is the effect, we only need to copy the corresponding function of the code can be, the other do not use the function, not to copy, this is the future we want to pursue code writing realm.
With a couple of official demos to integrate with my project diagram:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/F5/wKioL1XCIejC-924AAOQ0YzYTW8370.jpg "style=" float: right; "title=" Screenshot_2015-08-05-22-33-51.png "alt=" Wkiol1xciejc-924aaoq0yzytw8370.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F9/wKiom1XCH_KQHs3rAAP8QxmJuX4920.jpg "style=" float: right; "title=" Screenshot_2015-08-05-22-33-57.png "alt=" Wkiom1xch_kqhs3raap8qxmjux4920.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F5/wKioL1XCIeyRc79TAALmbZ30y68229.jpg "style=" float: right; "title=" Screenshot_2015-08-05-22-32-12.png "alt=" wkiol1xcieyrc79taalmbz30y68229.jpg "/>650" this.width= 650, "src=" http://s3.51cto.com/wyfs02/M00/70/F9/wKiom1XCH_XRX1duAAPPcKXRho4728.jpg "style=" float:right; "title=" Screenshot_2015-08-05-22-31-59.png "alt=" Wkiom1xch_xrx1duaappckxrho4728.jpg "/>
This article is from the "building the world with the keyboard" blog, please be sure to keep this source http://guo2android.blog.51cto.com/10476685/1682077
Integrated Iflytek speech Recognition Interface Project sharing