Partager via


Class SPXCancellationDetails

Declaration

@class SPXCancellationDetails : NSObject;

Description

Defines detailed information about why a result was canceled.

Methods

initFromCanceledRecognitionResult:

Creates an instance of SPXCancellationDetails object for the canceled SPXSpeechRecognitionResult.

- (instancetype _Nullable)initFromCanceledRecognitionResult:(SPXRecognitionResult * _Nonnull)recognitionResult

Parameters

  • recognitionResult - The result that was canceled.

Returns

The cancellation details object being created.

initFromCanceledRecognitionResult:error:

Creates an instance of SPXCancellationDetails object for the canceled SPXSpeechRecognitionResult.

Added in version 1.6.0.

- (instancetype _Nullable)initFromCanceledRecognitionResult:(SPXRecognitionResult * _Nonnull)recognitionResult
    error:(NSError * _Nullable * _Nullable)outError

Parameters

  • recognitionResult - The result that was canceled.
  • outError - error information.

Returns

The cancellation details object being created.

Properties

reason

@property (readonly, atomic) SPXCancellationReason reason;

The reason the recognition was canceled.

errorCode

@property (readonly, atomic) SPXCancellationErrorCode errorCode;

The error code in case of an unsuccessful recognition (reason is set to Error).

Added in version 1.1.0.

errorDetails

@property (readonly, copy, atomic) NSString * _Nullable errorDetails;

The error message in case of an unsuccessful recognition (reason is set to Error).