pbakondy / cordova-plugin-speechrecognition

:microphone: Cordova Plugin for Speech Recognition
MIT License
196 stars 117 forks source link

("Error Domain=kAFAssistantErrorDomain Code=209 \"(null)\"") Still Listening even it has error or forcibly stopped. #13

Closed Truedison closed 7 years ago

Truedison commented 7 years ago

This happens on spamming the listening trigger

pbakondy commented 7 years ago

device? os version? how can you tell the app is still listening?

Truedison commented 7 years ago

It displays a behaviour same as "not saying anything". Behaviour was After 30 mili/seconds of no activity then it pops an error message. after that happens it all goes okay.

Truedison commented 7 years ago

@mosca90 I think this is not related to your issue, Just want to ask if you have internet when you are testing this or have you done this

Requirements

XCode 8.0 (requires 10.12+ macOS Sierra or 10.11.5+ OS X El Capitan) iOS 10 NSMicrophoneUsageDescription permission NSSpeechRecognitionUsageDescription permission

ghost commented 7 years ago

@Truedison i'm under wifi with phone on airplane mode..

XCode - iOS latest version

Truedison commented 7 years ago

@mosca90 How about these 2 ?

NSMicrophoneUsageDescription permission NSSpeechRecognitionUsageDescription permission

ghost commented 7 years ago

@Truedison I'm calling exactly like here: https://github.com/pbakondy/cordova-plugin-speechrecognition/issues/17#issuecomment-280759863

I got 2 popups window of permission request.

Truedison commented 7 years ago

@mosca90 Do you have something like this on your config.xml if youre running on ionic

    <variable name="SPEECH_RECOGNITION_USAGE_DESCRIPTION" value="would like to use this recognition" />
ghost commented 7 years ago

@Truedison sorry, like what?

Truedison commented 7 years ago

@mosca90 I'm sorry, like this.

`"

    <variable name="SPEECH_RECOGNITION_USAGE_DESCRIPTION" value="would like to use this" />"`
ghost commented 7 years ago

@Truedison no. Added to config.xml but nothing change.. so sad.

Truedison commented 7 years ago

@mosca90 There's a right way to add it man. You dont have to add it manually in config.xml You have to uninstall the plugin and add again the plugin with those variables

ghost commented 7 years ago

cordova plugin add cordova-plugin-speechrecognition --variable MICROPHONE_USAGE_DESCRIPTION="microphone" --variable SPEECH_RECOGNITION_USAGE_DESCRIPTION="microphone" --save

Now in config.xml i have these lines: `

    <variable name="SPEECH_RECOGNITION_USAGE_DESCRIPTION" value="microphone" />
</plugin>`

Using this code to start recognition: https://github.com/pbakondy/cordova-plugin-speechrecognition/issues/17#issuecomment-280759863

iphone 5s with latest update. Run under wi-fi with plane mode on. Sim card with no service available in this phone.

When the recognition starts, near the wifi icon appear a search icon too, idk why. When the icon stops to turn, the error appears: Error Domain=kAFAssistantErrorDomain Code=209

After 3 attempt, there is no icon and the error is Error Domain=kAFAssistantErrorDomain Code=1

Maybe siri has some problem without sim service? Native recognition works well.

Thx @Truedison.

Truedison commented 7 years ago

@mosca90 Are you using this in Ionic ? I think they already added this in ionic-native maybe there's a new/better implementation there.

ghost commented 7 years ago

https://ionicframework.com/docs/v2/native/speechrecognition/

Btw, it would be nice in future to be able to remove the limitation to 10 iOS only, like Android which has various versions supported

pbakondy commented 7 years ago

"limitation to 10 iOS only" - Apple supports speech recognition since iOS 10. See: https://developer.apple.com/reference/speech?language=objc

shubam-wittyparrot commented 5 years ago

I am using in my iphone 8 and i am getting the same error code 209 can any1 please help me out.