Class SPXPronunciationAssessmentConfiguration
Declaration
@class SPXPronunciationAssessmentConfiguration : NSObject;
Description
Represents pronunciation assessment configuration Added in version 1.14.0
Methods
init:gradingSystem:granularity:enableMiscue:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity enableMiscue:(BOOL)enableMiscue
Parameters
referenceText
- The reference text.gradingSystem
- The point system for score calibration.granularity
- The evaluation granularity.enableMiscue
- If enables miscue calculation. When true, the pronounced words are compared to the reference text, and are marked with omission/insertion based on the comparison; when false, the recognized text will always be reference text.
Returns
an instance of pronunciation assessment configuration.
init:gradingSystem:granularity:enableMiscue:error:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity enableMiscue:(BOOL)enableMiscue
error:(NSError * _Nullable * _Nullable)outError
Parameters
referenceText
- The reference text.gradingSystem
- The point system for score calibration.granularity
- The evaluation granularity.enableMiscue
- If enables miscue calculation.outError
- error information.
Returns
an instance of pronunciation assessment configuration.
init:gradingSystem:granularity:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
Parameters
referenceText
- The reference text.gradingSystem
- The point system for score calibration.granularity
- The evaluation granularity.
Returns
an instance of pronunciation assessment configuration.
init:gradingSystem:granularity:error:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
gradingSystem:(SPXPronunciationAssessmentGradingSystem)gradingSystem
granularity:(SPXPronunciationAssessmentGranularity)granularity
error:(NSError * _Nullable * _Nullable)outError
Parameters
referenceText
- The reference text.gradingSystem
- The point system for score calibration.granularity
- The evaluation granularity.outError
- error information.
Returns
an instance of pronunciation assessment configuration.
init:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
Parameters
referenceText
- The reference text.
Returns
an instance of pronunciation assessment configuration.
init:error:
Initializes an instance of the SPXPronunciationAssessmentConfiguration. For parameter details, see the table Pronunciation assessment parameters.
- (instancetype _Nullable)init:(NSString * _Nonnull)referenceText
error:(NSError * _Nullable * _Nullable)outError
Parameters
referenceText
- The reference text.outError
- error information.
Returns
an instance of pronunciation assessment configuration.
initWithJson:
Initializes an instance of the SPXPronunciationAssessmentConfiguration using json string.
- (instancetype _Nullable)initWithJson:(NSString * _Nonnull)json
Parameters
json
- the json string.
Returns
an instance of pronunciation assessment configuration.
initWithJson:error:
Initializes an instance of the SPXPronunciationAssessmentConfiguration using json string.
- (instancetype _Nullable)initWithJson:(NSString * _Nonnull)json
error:(NSError * _Nullable * _Nullable)outError
Parameters
json
- the json string.outError
- error information.
Returns
an instance of pronunciation assessment configuration.
phonemeAlphabet
- (NSString * _Nullable)phonemeAlphabet
nbestPhonemeCount
- (NSInteger)nbestPhonemeCount
enableProsodyAssessment
Whether to enable prosoody assessment.
Added in version 1.33.0.
- (void)enableProsodyAssessment
enableContentAssessmentWithTopic:
Enables content assessment with specific topic.
Added in version 1.33.0.
- (void)enableContentAssessmentWithTopic:(NSString * _Nonnull)topic
toJson
Gets the json string of pronunciation assessment parameters.
- (NSString * _Nullable)toJson
Returns
json string of pronunciation assessment parameters.
applyToRecognizer:
Applies the settings in this config to a recognizer.
- (void)applyToRecognizer:(SPXRecognizer * _Nonnull)recognizer
Parameters
recognizer
- The target recognizer.
applyToRecognizer:error:
Applies the settings in this config to a recognizer.
- (BOOL)applyToRecognizer:(SPXRecognizer * _Nonnull)recognizer
error:(NSError * _Nullable * _Nullable)outError
Parameters
recognizer
- The target recognizer.outError
- error information.
Properties
referenceText
@property (readwrite, copy, nonatomic) NSString * _Nullable referenceText;
The reference text.
phonemeAlphabet
@property (readwrite, copy, nonatomic) NSString * _Nullable phonemeAlphabet;
The phoneme alphabet. Valid values are "SAPI" (default) and "IPA".
NOTE: Added in version 1.20.0
nbestPhonemeCount
@property (assign, readwrite, nonatomic, unsafe_unretained) NSInteger nbestPhonemeCount;
The nbest phoneme count.
NOTE: Added in version 1.20.0