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 |
---|---|---|
|
|
Assets are not installed. // Assets are not installed |
|
|
Siri or Dictation is disabled. // Siri or Dictation 被禁用 |
|
|
Failed to initialize recognizer. // Initialization failed |
|
|
Request was canceled. // request cancellation - common |
|
|
Failure occurred during speech recognition. // Speech recognition failed |
|
|
Trying to start recognition while an earlier instance is still active. // Trying to recognize, but the previous instance is still active. (Not triggered) |
|
|
Connection to speech process was invalidated. // The connection is invalid |
|
|
Connection to speech process was interrupted. // The connection was interrupted - it appeared when the App entered the background |
|
|
Failed to recognize any speech. // Unable to recognize speech - common |
|
|
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.