Closed tillson closed 8 years ago
Look at step 5 of the quick start, the section for setting up the AppDelegate.m https://wit.ai/docs/ios/4.0.0/quickstart
#import "AppDelegate.h"
#import <AVFoundation/AVFoundation.h>
#import <Wit/Wit.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];
[Wit sharedInstance].accessToken = @"YOUR_ACCESS_TOKEN"; // replace xxx by your Wit.AI access token
//enabling detectSpeechStop will automatically stop listening the microphone when the user stop talking
[Wit sharedInstance].detectSpeechStop = WITVadConfigDetectSpeechStop;
return YES;
}
Calling Wit.sharedInstance().start() in Swift triggers the following error:
I installed using CocoaPods... Not really sure what the problem is.