添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi, I’ve got an Error with the SpeechRecognition on iOS that freaking me out…
Android works fine. iOS Emulator works with no problems. But on a real Device I always got an 203 Error

console.error: error: Error Domain=kAFAssistantErrorDomain Code=203 “Corrupt”
[app-scripts] UserInfo={NSLocalizedDescription=Corrupt, NSUnderlyingError=0x2830060a0 {Error Domain=SiriSpeechErrorDomain
[app-scripts] Code=102 “(null)”}}

can someone help ?

Thank you.
I have bypassed the problem differently, I have set the AudioSessionCategory to PlayAndRecord. The CategoryOptions but not on defaultToSpeaker, so the speech recognition works even if the audio output is interrupted, but the audio output does not run over the speakers. Therefore I use external speakers.

I actually figured out how to solve my problem. If you worked with the “Recognizing Speech in Live Audio” documentation like I did. Then you probably have the following code somewhere:

// Configure the audio session for the app.
let audioSession = AVAudioSession.sharedInstance()
try audioSession.setCategory(.record, mode: .measurement, options: .duckOthers)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
let inputNode = audioEngine.inputNode

I had to replace line 3 with:

try audioSession.setCategory(.playAndRecord, mode: .measurement, options: .defaultToSpeaker)

now everything works fine.