pbakondy / cordova-plugin-speechrecognition

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

Error on No speech. #11

Closed Truedison closed 7 years ago

Truedison commented 7 years ago

When i run startlistening, and stopping it without recording/speaking it produces error. Is this a correct behaviour ?

pbakondy commented 7 years ago

Yes it is. You expect recognized terms when you start the recognition process. When the recognition is unsuccessful ( because of any reason like not speaking/network error/noisy environment/etc ) it can't return with success callback.

BTW what error message do you get?

Truedison commented 7 years ago

Here it is

"Error Domain=kAFAssistantErrorDomain Code=203 \"Retry\" UserInfo={NSLocalizedDescription=Retry, NSUnderlyingError=0x170254760 {Error Domain=SiriSpeechErrorDomain Code=1 \"(null)\"}}"

I was able to reproduce this error by stopping it without even talking. I was having a hard time getting the error since its not in json. Thanks for the response

pbakondy commented 7 years ago

Yeah, Apple should improve the documentation. I could not find any usable list of kAFAssistantErrorDomain error codes anywhere.

Truedison commented 7 years ago

Okay thanks for the response, Maybe ill land this on a general error. Thanks !

Truedison commented 7 years ago

Ill just close this issue thnaks

Ahmadbaba46 commented 7 years ago

Does it require network to work? It always return error to me even if i talk.

Truedison commented 7 years ago

@Ahmadbaba46 Yep

Ahmadbaba46 commented 7 years ago

@Truedison thanks, it works

Truedison commented 7 years ago

@Ahmadbaba46 no problem same behaviour with siri no internet = sad