voice
voice copied to clipboard
Voice Recognition Failed Error
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.
Same issue.
+1
@cleandevcode Did you get any solution?
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
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],
);
Has anyone found the solution? I’m getting the same error. onSpeechError: {"error": {"code": "recognition_fail", "message": "203/Retry"}}