class PronunciationAssessmentConfig

Class that defines pronunciation assessment configuration Added in 1.14.0.

Members

operator SPXPRONUNCIATIONASSESSMENTCONFIGHANDLE

Syntax: public inline explicit operator SPXPRONUNCIATIONASSESSMENTCONFIGHANDLE ( ) const;

Internal operator used to get underlying handle value.

Returns

A handle.

ToJson

Syntax: public inline std::string ToJson ( ) const;

Gets to json string of pronunciation assessment parameters.

Returns

json string of pronunciation assessment parameters.

GetReferenceText

Syntax: public inline std::string GetReferenceText ( );

Gets the reference text.

Returns

The reference text.

SetReferenceText

Syntax: public inline void SetReferenceText ( const std::string & referenceText );

Sets the reference text.

Parameters

  • referenceText The reference text.

SetReferenceText

Syntax: public inline void SetReferenceText ( const std::wstring & referenceText );

Sets the reference text.

Parameters

  • referenceText The reference text.

SetPhonemeAlphabet

Syntax: public inline void SetPhonemeAlphabet ( const std::string & phonemeAlphabet );

Sets phoneme alphabet. Valid values are: "SAPI" (default) and "IPA".

Added in version 1.20.0.

Parameters

  • phonemeAlphabet The phoneme alphabet.

SetNBestPhonemeCount

Syntax: public inline void SetNBestPhonemeCount ( int count );

Sets nbest phoneme count in the result.

Added in version 1.20.0.

Parameters

  • count The nbest phoneme count.

EnableProsodyAssessment

Syntax: public inline void EnableProsodyAssessment ( );

Enables prosody assessment.

Added in version 1.33.0.

EnableContentAssessmentWithTopic

Syntax: public inline void EnableContentAssessmentWithTopic ( const std::string & contentTopic );

Enables the content assessment with topic.

Added in version 1.33.0.

Parameters

  • contentTopic The content topic.

ApplyTo

Syntax: public inline void ApplyTo ( std::shared_ptr< Recognizer > recognizer ) const;

Applies the settings in this config to a Recognizer.

Parameters

  • recognizer The target Recognizer.

~PronunciationAssessmentConfig

Syntax: public inline virtual ~PronunciationAssessmentConfig ( );

Destructs the object.

Create

Syntax: public inline static std::shared_ptr< PronunciationAssessmentConfig > Create ( const std::string & referenceText , PronunciationAssessmentGradingSystem gradingSystem , PronunciationAssessmentGranularity granularity , bool enableMiscue );

Creates an instance of the PronunciationAssessmentConfig For parameter details, see the table Pronunciation assessment parameters.

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

A shared pointer to the new PronunciationAssessmentConfig instance.

Create

Syntax: public inline static std::shared_ptr< PronunciationAssessmentConfig > Create ( const std::wstring & referenceText , PronunciationAssessmentGradingSystem gradingSystem , PronunciationAssessmentGranularity granularity , bool enableMiscue );

Creates an instance of the PronunciationAssessmentConfig For parameters details, see the table Pronunciation assessment parameters.

Parameters

  • referenceText The reference text

  • gradingSystem The point system for score calibration

  • granularity The evaluation granularity

  • enableMiscue If enables miscue calculation

Returns

A shared pointer to the new PronunciationAssessmentConfig instance.

CreateFromJson

Syntax: public inline static std::shared_ptr< PronunciationAssessmentConfig > CreateFromJson ( const std::string & json );

Creates an instance of the PronunciationAssessmentConfig from json. See the table Pronunciation assessment parameters.

Parameters

  • json The json string containing the pronunciation assessment parameters.

Returns

A shared pointer to the new PronunciationAssessmentConfig instance.