Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple Voice Recognition Swift? [closed]

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)

like image 208
Junaid Avatar asked Apr 10 '15 20:04

Junaid


3 Answers

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)
})
like image 189
fpg1503 Avatar answered Sep 21 '22 01:09

fpg1503


you can use

OpenEars SDK http://www.politepix.com/openears/

or

AT&T Watson http://developer.att.com/apis/speech

like image 21
kavehmb Avatar answered Sep 19 '22 01:09

kavehmb


You'll want to use SpeechKit. Ray has a nice tutorial here:

http://www.raywenderlich.com/60870/building-ios-app-like-siri

The SDK is developed by Nuance (the dragon people):

http://nuancemobiledeveloper.com/public/index.php

like image 40
Oxcug Avatar answered Sep 22 '22 01:09

Oxcug