In my app when the user says a certain word or words the app will answer by reading out a sentence which is set in app. What is the simplest way of doing this?
I'm using the latest version of Xcode (Its for my WWDC 2015 scholarship app)
As of iOS 10 you can use Speech.framework:
import Speech
let recognizer = SFSpeechRecognizer()
let request = SFSpeechURLRecognitionRequest(url: audioFileURL)
recognizer?.recognitionTask(with: request, resultHandler: { (result, error) in
print (result?.bestTranscription.formattedString)
})