Hi,
I'm using the Microsoft.CognitiveServices.Speech (Version 1.33.0) nuget package in csharp to recognise and assess speech from a microphone. I'm doing this using the streaming service with Continuous Recognition (i.e. via StartContinuousRecognitionAsync()).
I'm using the following pronunciation configuration:
var configuration = new PronunciationAssessmentConfig(
referenceText: referenceText,
gradingSystem: GradingSystem.HundredMark,
granularity: Granularity.Phoneme,
enableMiscue: true)
{
NBestPhonemeCount = 3,
// PhonemeAlphabet = "IPA", // IPA should work but doesn't
};
configuration.EnableProsodyAssessment();
When running, I've attached to the Recognized event, and am inspecting the json result using : speechRecognitionResult.Properties.GetProperty(PropertyId.SpeechServiceResponse_JsonResult);
If I leave the configuration as default (SAPI) the phonemes are returned as expected within a Recognized event, but if I uncomment the PhonemeAlphabet line to set to IPA the phoneme values all come back as empty strings, so, when set to SAPI I get :
{
"Phoneme": "uh",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [{
"Phoneme": "uh",
"Score": 93.0
}, {
"Phoneme": "r",
"Score": 80.0
}, {
"Phoneme": "er",
"Score": 63.0
}
]
},
"Offset": 27600000,
"Duration": 700000
}
When set to IPA the phonemes all come back as empty strings:
{
"Phoneme": "",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [{
"Phoneme": "",
"Score": 93.0
}, {
"Phoneme": "",
"Score": 80.0
}, {
"Phoneme": "",
"Score": 63.0
}
]
},
"Offset": 27600000,
"Duration": 700000
}
I'm working in en-GB, but this is also happening with en-US.
The PronunciationAssessmentConfig documentation states that IPA is a valid value for the PhonemeAlphabet property (Pronunciation config documentation) , and if I set it to something nonsensical ("junk") then I get an exception, so IPA is being validated as a correct value.
The fact that the phonemes are just stripped makes me wonder whether this is maybe an character encoding bug/issue - but the classes are so heavily tucked behind interop that it's very difficult to unravel.
Any advice would be much appreciated. Many thanks, Nick