SFSpeechRecognitionTask.error error code comparison table

Annotated the common error comparison table in the iOS speech recognition engine

error

An error object that specifies the error that occurred during a speech recognition task.

iOS 10.0+ macOS 10.15+ Mac Catalyst 13.1+ 

Declaration 

@property(nonatomic, readonly, copy, nullable) NSError *error;

Discussion

The system may return one of the errors listed in the table below.

Error Code

Error Domain

Description

102

kLSRErrorDomain

Assets are not installed. // Assets are not installed

201

kLSRErrorDomain

Siri or Dictation is disabled. // Siri or Dictation 被禁用

300

kLSRErrorDomain

Failed to initialize recognizer. // Initialization failed

301

kLSRErrorDomain

Request was canceled. // request cancellation - common

203

kAFAssistantErrorDomain

Failure occurred during speech recognition. // Speech recognition failed

1100

kAFAssistantErrorDomain

Trying to start recognition while an earlier instance is still active. // Trying to recognize, but the previous instance is still active. (Not triggered)

1101

kAFAssistantErrorDomain

Connection to speech process was invalidated. // The connection is invalid

1107

kAFAssistantErrorDomain

Connection to speech process was interrupted. // The connection was interrupted - it appeared when the App entered the background

1110

kAFAssistantErrorDomain

Failed to recognize any speech. // Unable to recognize speech - common

1700

kAFAssistantErrorDomain

Request is not authorized. // Set the permission to open

These also return :

Error Domain=NSURLErrorDomain Code=-1017  cannot parse response.

Error Domain=NSURLErrorDomain Code=-1001  The request timed out.

Guess you like

Origin blog.csdn.net/siwen1990/article/details/130057784