i'am using azure speech recognizer sdk , to do the prononciation assessment of an audio file. the problem when the speech is in french the results are always low , and no expressive
const language = await detectSingleSpeechLanguage(text)
//Connect to the prononciation assessment ressource
const speechConfig = sdk.SpeechConfig.fromSubscription(
"keys",
"eastus"
);
speechConfig.setProperty()
//download the audio of user from the blob storage
const audioBlobClient = await storageConnectionAudio(audioBlobName);
await waitForBlob(audioBlobClient);
const audio = await audioBlobClient.download();
const downloadedFile = await streamToBuffer(audio.readableStreamBody);
let audioConfig = sdk.AudioConfig.fromWavFileInput(downloadedFile);
console.log(audioConfig)
let speechRecognizer = new sdk.SpeechRecognizer(
speechConfig,
audioConfig
);
const pronunciationAssessmentConfig = sdk.PronunciationAssessmentConfig.fromJSON(
"{\"GradingSystem\": \"HundredMark\", \
\"Granularity\": \"Phoneme\", \
\"EnableMiscue\": \"True\", \
\"EnableProsodyAssessment\": \"True\"}"
);
pronunciationAssessmentConfig.referenceText = text;
if (language === "English") {
speechConfig.speechRecognitionLanguage = "en-US";
}
if (language === "French"){
speechConfig.speechRecognitionLanguage = "fr-FR";
}
pronunciationAssessmentConfig.applyTo(speechRecognizer);
//Start of the prononciation assessment
speechRecognizer.recognizeOnceAsync(async (result) =>
{console.log(result)
switch (result.reason) {
case sdk.ResultReason.RecognizedSpeech:
const pronunciation_result =
sdk.PronunciationAssessmentResult.fromResult(result);