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: Optional[str] = None, grading_system: azure.cognitiveservices.speech.PronunciationAssessmentGradingSystem = <PronunciationAssessmentGradingSystem.FivePoint: 1>, granularity: azure.cognitiveservices.speech.PronunciationAssessmentGranularity = <PronunciationAssessmentGranularity.Phoneme: 1>, enable_miscue: bool = False, json_string: Optional[str] = None)

Parameters

reference_text
default value: None

The reference text for pronunciation assessment

grading_system
default value: PronunciationAssessmentGradingSystem.FivePoint

The point system for score calibration

granularity
default value: PronunciationAssessmentGranularity.Phoneme

The evaluation granularity

enable_miscue
default value: False

If enables miscue calculation

json_string
default value: None

A json string representing pronunciation assessment parameters

Methods

apply_to

Apply the settings in this config to a recognizer.

to_json

Gets to json string of pronunciation assessment parameters.

apply_to

Apply the settings in this config to a recognizer.

apply_to(recognizer: azure.cognitiveservices.speech.Recognizer) -> None

Parameters

recognizer
Required

the target recognizer.

to_json

Gets to json string of pronunciation assessment parameters.

to_json() -> str

Returns

the json string.

Attributes

nbest_phoneme_count

phoneme_alphabet

reference_text

The reference text.