PronunciationAssessmentConfig Class

Represents pronunciation assessment configuration

Note

Added in version 1.14.0.

The configuration can be initialized in two ways:

  • from parameters: pass reference text, grading system, granularity, enable miscue and scenario id.

  • from json: pass a json string

For the parameters details, see https://docs.microsoft.com/azure/cognitive-services/speech-service/rest-speech-to-text#pronunciation-assessment-parameters

Inheritance
builtins.object
PronunciationAssessmentConfig

Constructor

PronunciationAssessmentConfig(reference_text: str | None = None, grading_system: PronunciationAssessmentGradingSystem = PronunciationAssessmentGradingSystem.FivePoint, granularity: PronunciationAssessmentGranularity = PronunciationAssessmentGranularity.Phoneme, enable_miscue: bool = False, json_string: str | None = None)

Parameters

Name Description
reference_text

The reference text for pronunciation assessment

Default value: None
grading_system

The point system for score calibration

Default value: PronunciationAssessmentGradingSystem.FivePoint
granularity

The evaluation granularity

Default value: PronunciationAssessmentGranularity.Phoneme
enable_miscue

If enables miscue calculation

Default value: False
json_string

A json string representing pronunciation assessment parameters

Default value: None

Methods

apply_to

Apply the settings in this config to a recognizer.

enable_content_assessment_with_topic

Enable content assessment with topic.

enable_prosody_assessment

Enable prosody assessment.

to_json

Gets to json string of pronunciation assessment parameters.

apply_to

Apply the settings in this config to a recognizer.

apply_to(recognizer: Recognizer) -> None

Parameters

Name Description
recognizer
Required

the target recognizer.

enable_content_assessment_with_topic

Enable content assessment with topic.

enable_content_assessment_with_topic(topic: str) -> None

Parameters

Name Description
topic
Required

the topic.

enable_prosody_assessment

Enable prosody assessment.

enable_prosody_assessment() -> None

to_json

Gets to json string of pronunciation assessment parameters.

to_json() -> str

Returns

Type Description

the json string.

Attributes

nbest_phoneme_count

phoneme_alphabet

reference_text

The reference text.