Speakhere Configuration Instructions
Previously seen in the group of children's shoes using Apple's official speakhere for speech recognition, but has been configured to go wrong, yesterday tried, some details need attention, here for my configuration instructions.
It should be noted that Speakhere is a non-arc engineering, Xcode5.1 the default arc when the project is created
Steps:
1. Create the project, add the required documents to the project
SpeakHereAppDelegate.h and SPEAKHEREAPPDELEGATE.M files in the class folder do not need to be added
That is, these two files
Add Library
Add in file Exampleofspeakhere-prefix.pch file
#define Kbufferdurationseconds 5
2,
(1) Non-arc mode
There was an error compiling
Solve this problem project->target->build settings, find
Change according to file type
Objective-c++, this is because the speakhere part of the file is encoded by C + +
Find preprocessor Macros in build settings, i.e.
Empty the parameters in debug, i.e.
If you compile again, you will find that the problem is resolved and new problems arise.
Change it to:
The same problem can be resolved with two issues changing
Build Again,
Add #import "AQLevelMeter.h" header file
Compiled again, if strictly follow the steps, you can already compile
(2) Arc mode
Set a file that is not in arc mode
Icon:
Compile again, problem occurs
Follow the prompts to make changes
At this point, the compilation can pass
Add code in the section where you need to add speech recognition
Speakhereviewcontroller *_viewcon = [[Speakhereviewcontroller alloc] init];
[Self.window Setrootviewcontroller:_viewcon];
debugger, you can pass