2

I'm working on the development of a demo like Siri with Speech Kit, but when I call recognitionTask = speechRecognizer.recognitionTask(with: recognitionRequest) {} to begin listening, it will immediately return an error:

Error Domain=SiriCoreSiriConnectionErrorDomain Code=16 "(null)"

My demo is very simple and almost the same as the sample code SpeakToMe in Xcode, so I tried that sample project and got the same error. I used a real device to debug, not a simulator, and both the privacy permissions about Usage of Microphone and Speech Recognition were added into the info.plist, I even tried adding all the privacy items including what I didn't use but it didn't work either.

I really need some help now. Anyone can give me some tips about this error? The full error message as follow:

Error:Optional(Error Domain=kAFAssistantErrorDomain Code=4 "(null)" UserInfo={NSUnderlyingError=0x17404ae30 {Error Domain=SiriCoreSiriConnectionErrorDomain Code=16 "(null)" UserInfo={NSUnderlyingError=0x17404b790 {Error Domain=NSOSStatusErrorDomain Code=-9806 "(null)" UserInfo={_kCFStreamErrorCodeKey=-9806, _kCFStreamErrorDomainKey=3}}}}})

Abby Lin
  • 51
  • 4
  • Swift or ObjC ? – Ludovic Feb 15 '17 at 08:18
  • Did you add NSSpeechRecognitionUsageDescription to info.plist ? – Ludovic Feb 15 '17 at 08:24
  • @Ludovic Swift, and I have already added NSSpeechRecognitionUsageDescription into info.plist. But thanks for your tips, I think I will try the ObjC version to see what will happen. – Abby Lin Feb 16 '17 at 01:55
  • @AbbyLin- Have you checked your network connection. As in my case when there is no network it show same error. So was wondering whether iOS 10 speech recognition with speech kit is not working offline? – SoftSan Jul 15 '17 at 15:21

0 Answers0