I. Summary
What I want to do next is to use the speech recognition technology. The better thing in China is xunfei speech cloud. below is the configuration record of the Android Application Development Environment Based on xunfei speech cloud. ,
The environment on my computer is eclipse Indigo. The Android version is 2.3.3, 4.03, and 4.1. The mobile phone number is Xiaomi M1s.
Ii. Steps
1. register the ID on the official website and download the document androidsdk;
2. Create a project in eclipse, select Android project from exiting code, select the sample folder of the decompressed SDK, and click OK;
3. Register app_id in res-> values-> strings. xml:
<String name = "app_id"> XXXXXXXX </string>
3. I found that the project had a cross-fork, opened the. Java file, and found that all import statements had errors: the import java. util cannot be resolved
Cause: this is because your project buildpath is incorrect.
Solution: Right-click Project ------- buildpath -------- and select libraries in the bottom configuration to find JRE. (at this time, you will find that there is a JRE in front of this! Or red X) select Remove and re-select a JRE project for the project, project ---- clean
You also need to modify project. properties in the sample,
# Project target.
Target = Android-10
(Target version 2.3.3)
Create a new project.
4. Warning: application does not specify an API level requirement!
Cause: the minimum version of the project is not supported,
Solution:
Modify the androidmanifest. xml file. Add: <uses-SDK Android: minsdkversion = "8"> </uses-SDK>Between <manifest> </manifest>.
5. When running, click the button and return. The log shows: cocould not find class 'com. iflytek. mscdemo. ** demoactive'
Cause: no corresponding class found in the project
Solution:
1. Add MSC. jar to Java build path-> libraries. Note: Add external jars... That is, MSC. Jar
You do not need to copy the file to the working directory; otherwise, an error occurs;
2. For Java build path-> order and export, check MSC. jar and other dependent projects;
3. If an error occurs during compilation and running, restart eclipse, clear the Project (Project-> clear), restart the project, and compile the project ......;
4. Restart AVD or unplug the USB of your mobile phone ......;
3. Experience
The demo contains the speech dictation, keyword recognition, and speech synthesis functions. I used the first and third functions.
I tried it in a Wi-Fi environment.
Speech dictation is still good. The recognition rate is very high, and the response is faster than Siri. speech synthesis is a bit watery. The entire sentence of English sounds awkward.
You can select gender for pronunciation.