Closed hybridapp20161 closed 7 years ago
You have to run on a device. The iOS simulator does not have access to your Mac’s microphone.
when i run on device it give me this error(error domain=kAFAssitantErrorDomainCode=216"(null)")
Did you request permission? What is your environment? cordova, xcode, ios version?
yes i have already given these permission (NSMicrophoneUsageDescription permission & NSSpeechRecognitionUsageDescription permission) with its string value in info.plist. My cordova version:6.3.1 xcode:Version 8.0 (8A218a) IOS:OS X EI Capitan..10.11.6 (15G1004)
You have to call requestPermission() to get those permissions, info.plist only is not enough.
I've already implemented requestPermission() method as shown in below code-
window.plugins.speechRecognition.requestPermission(function(requestpermissionResult){ console.log("Stop message: " + requestpermissionResult); alert("requestPermission::"+requestpermissionResult); }, function(requestpermissionErrorMessage){ console.log("Error message: " + requestpermissionErrorMessage); alert("Error message :requestPermissionError::"+requestpermissionErrorMessage); });
Is this enough or should I have to implement in other way ??
You should call it before using startListening(). You should see a popup window of permission request.
We are calling it before startListening(). We are getting Popup asking for permission also. After clicking on ok, it goes to startListening method and we get the error domain=kAFAssitantErrorDomainCode=216"(null)").
Where do you see this error? Does it come with the error callback of startListening() ? What is the iOS version of your phone?
Yes i am running on actual device with ios version 10.0.2(14A456)and that error comes in error callback alert of startListening() method.
I could not found any solution yet. I don't know what this error code means. The Apple docs does not list this error.
This forum topic is about the same issue without resolve: https://forums.developer.apple.com/thread/51938
Please try reinstall cordova and Xcode.
We tried reinstalling as well but did not work.
Please try with latest XCode 8.1 and iOS 10.1
Have updated to ios version:10.1 (14B72) and xcode version:Version 8.1 (8B62) still same issue persist.
I have same problem, someone have a solution?
Functions Avaliable - works HasPermition - works RequestPermition - works
But startListening - not work
I am with:
Cordova CLI: 6.5.0 Ionic Framework Version: 2.0.1 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 1.0.0 ios-deploy version: 1.9.1 ios-sim version: 5.0.13 OS: macOS Sierra Node Version: v6.9.2 Xcode version: Xcode 8.2.1 Build version 8C1002
I need help.
you can send me your project that works on your computer to iOS?
I can test here...
Please check last release
@pbakondy does the latest release solve the problem? I have the same problem on the device itself. everything is using the latest version (device, itunes, xcode)
Yes it does
I have the versión cordova-plugin-speechrecognition 1.1.2 "Speech Recognition" and I have this problem
cordova 7.0.0
Iphone 6s IOS 10.3.1
Ipad pro IOS 10.0.2
Xcode Version 8.3.2 (8E2002)
I start seeing the problem when I call te startListening method very often like I push the button 3 times in a short period of time ...
"Error Domain=kAFAssistantErrorDomain Code=209 \"(null)\""
I solved the problem i describe above, the problem is caused because I call the method startListening before the last called returns, so, I used a flag to prevent to call startListening if the last call didn't returned yet. However there still a problem, when I call multiple times the startListening the plugin returns
"Error Domain=kAFAssistantErrorDomain Code=203 \"Corrupt\" UserInfo={NSLocalizedDescription=Corrupt, NSUnderlyingError=0x1704506e0 {Error Domain=SiriSpeechErrorDomain Code=102 \"(null)\"}}"
This error doesn't cause a plugin crash like the previous one, after this error occur the plugin is able to listen again
code=216 -> in my case it was because I initialized the SFSpeechRecognizer without locale. So, the code that worked is:
private SFSpeechRecognizer SpeechRecognizer = new SFSpeechRecognizer(new NSLocale("en_US"));
Hi Peter, I am using your plugin in cordova app,it give me error on simulator(error domain=kAFAssitantErrorDomainCode=1101"(null)") and says missing permission in isListening function. Also in device it give me error(error domain=kAFAssitantErrorDomainCode=216"(null)").
Kindly help. Thanks in advance