wit-ai / wit-ios

Wit.ai iOS client
Other
222 stars 71 forks source link

how to import wit.ai in ios #71

Closed aakash1492 closed 7 years ago

aakash1492 commented 8 years ago

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?

anuraagdjain commented 8 years ago

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") }

hactar commented 7 years ago

Closing as the question was answered, please reopen if you still have issues.