voice icon indicating copy to clipboard operation
voice copied to clipboard

Voice Recognition Failed Error

Open cleandevcode opened this issue 2 years ago • 6 comments

My stacks:

"react": "17.0.2"
"react-native" : "0.68.1"
"@react-native-voice/voice": "^3.2.3"

Platform

iOS (15.4.1)
iPhone 6s Plus

I tried to use this SDK to get speech-to-text real-time but it worked sometimes, but it did not work sometimes.

So I tried to check the error code and Below is the error code from the Voice.onSpeechError event.

code: 'recognition_fail', 
message: '203/Error'

I tried to get availability by using Voice.isAvailable() before starting, but it was 1.

It was a related bug from XCode debugging.

[Utility] +[AFAggregator logDictationFailedWithError:] Error Domain=kAFAssistantErrorDomain Code=203 "Error" UserInfo={NSLocalizedDescription=Error, NSUnderlyingError=0x281a99da0 {Error Domain=SiriSpeechErrorDomain Code=501 "(null)"}}

Thank you.

cleandevcode avatar May 13 '22 12:05 cleandevcode

Same issue.

neural-nut avatar May 19 '22 05:05 neural-nut

+1

ferasallaou avatar Nov 01 '23 14:11 ferasallaou

@cleandevcode Did you get any solution?

kumarparth380 avatar Jan 11 '24 16:01 kumarparth380

I'm getting the same error. I think it's a Xcode simulator microphone issue/protection.

I build and deploy the app to the real device and it works.

But I need this on simulator to finish the work

poor666 avatar Jan 20 '24 23:01 poor666

Hitting this issue as well (at least in the simulator) and am resorting to this to get around it for now:

  const onSpeechError = useCallback(
    (e: SpeechErrorEvent) => {
      console.log('onSpeechError: ', e);
      // If there is a long pause between last response and next query, this error
      // occurs and the mic stops listening. So now we restart it.
      if (e.error?.message === '203/Error') {
        restartListening();
      }
    },
    [restartListening],
  );

gudlyf avatar Feb 21 '24 16:02 gudlyf

Has anyone found the solution? I’m getting the same error. onSpeechError: {"error": {"code": "recognition_fail", "message": "203/Retry"}}

dziekan30 avatar Mar 11 '24 15:03 dziekan30