how to import wit.ai in ios
aakash1492 opened this issue · 2 comments
I am new to ios and I am planning to make a voice interactive app. For that I need wit.ai. How should I import this framework to my project?
in your PodFile type paste this pod 'Wit', '~> 4.1.0'
and then give pod install from terminal. Make sure you are inside your project folder. Once the Pod is installed in bridging header file paste #import "Wit/Wit.h"
.
And in Appdelegate.swift , inside didFinishLaunchingWithOptions
, paste this
do{ try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord) try AVAudioSession.sharedInstance().setActive(true) Wit.sharedInstance().detectSpeechStop = WITVadConfig.DetectSpeechStop Wit.sharedInstance().accessToken = WIT_API_KEY } catch{ print("WIT AppDelegate Error") }
Closing as the question was answered, please reopen if you still have issues.