List of Speech Recognition Error Codes?

Hi all,


I am using the code to detech speech in the simplist audio file of all time. Literally has 20 words spoken by a professional at a recording studio. The Speech recognition always returns this error:

Error Domain=kAFAssistantErrorDomain Code=1 "(null)"


I am using a corrected version of Apple's broken sample code (This is the correct code I am using):


func recognizeFile(url: URL) {
        guard let myRecognizer = SFSpeechRecognizer() else {
            /
            return
        }
        if !myRecognizer.isAvailable {
            /
            return
        }
        let request = SFSpeechURLRecognitionRequest(url: url)
        request.shouldReportPartialResults = true
        myRecognizer.recognitionTask(with: request) { (result, error) in
            guard let result = result else {
                /
                return
            }
            if result.isFinal {
                /
                print("Speech in the file is \(result.bestTranscription.formattedString)")
            }
        }
    }


I have never been able to get the Speech Recognition to work unless the audio file has a single word like "Cheese".. Is Siri technology this primitive for real?


It kind of blows my mind that Apple doesn't have any direct reference to these errors anywhere.


Can you please help?


Best

Simulator or device fail?

Calling .endAudio from outside recognitionTaskWithRequest... in viewDidDisappear(), for example?

The list of all the possible errors and their meaning would actually help everybody, but somehow, it does not exist, I don't get it.
List of Speech Recognition Error Codes?
 
 
Q