SFSpeechRecognizer fails with error kAFAssistantErrorDomain Code=1107
Asked Answered
I

1

5

I'm trying to transcribe local audio files in my app. Short files recognised fine, but if audio is more than about 15 min it is not. Console immediately shows this error:

2020-01-17 12:57:07.528986+0300 App[2816:791131] [Utility] +[AFAggregator logDictationFailedWithError:] Error Domain=kAFAssistantErrorDomain Code=1107 "(null)"

This is my code:

        let localRecognitionRequest = SFSpeechURLRecognitionRequest(url: fileUrl)
        localRecognitionRequest.shouldReportPartialResults = false
        if speechRecognizer.supportsOnDeviceRecognition {
            localRecognitionRequest.requiresOnDeviceRecognition = true
        }
        recognitionTask = speechRecognizer.recognitionTask(with: localRecognitionRequest, delegate: self)

And when there is an error, only one delegate method fires:

    func speechRecognitionTask(_ task: SFSpeechRecognitionTask, didFinishSuccessfully successfully: Bool) { }

with successfully = false

I have Xcode 11.3.1

Trying only on device - iPhone XS (iOS 13.3)

Have anyone faced this problem?

Inadvertent answered 17/1, 2020 at 11:32 Comment(8)
Did you find a solution to this? I've been stuck on this for months with a small personal project. Also get error 203 "Null" on shorter recordings with long periods of no clear voices. Longer recordings result in kAFAssistantErrorDomain Code=1107 "(null)".Angioma
@RyanTremblay no, trying to solve it for a week now with absolutely no success. No one says about 1107 error on the entire internet. I haven't had 203 error, but my recordings always clear and with no silence.Inadvertent
Still haven't found a solution. I also posted about it on the Apple Forums: forums.developer.apple.com/thread/128314. It would be helpful if you posted your details there too so Apple is more likely to take notice.Angioma
Thanks for info. I replied you there and help to resolve problem with partial result in recognition. But other issues is still unsolved :(Inadvertent
Hi, I have the same problem. Do you found solution for fix this error?Finegrained
No, still stuck. As soon as I figure it out, I reply hereInadvertent
I submitted a code-level support request to Apple using my Dev Membership. Hopefully, they'll have answer soon.Angioma
Reproduced error 1107 on Iphone12, audio file length 54m. The error happens approx on 20m. Ipad M1 runs the same speech recognition without an error.Ruscio
P
10

I was also seeing error code 1107 and as strange as this sounds, a Simulator reset fixed it for me.

While the simulator is selected:

  1. Go to the top Menu
  2. Select Device
  3. Click on Erase All Content and Settings...
  4. (Optional) Kill XCode and relaunch

Erase All Content And Settings...

This did the trick.

Peculation answered 11/3, 2022 at 17:9 Comment(1)
This approach works for me! Thanks!Polytypic

© 2022 - 2024 — McMap. All rights reserved.