Azure Speech Pronunciation Assessment Kept Failing

Glen Wang 20 Reputation points
2024-03-21T11:52:33.47+00:00

I tried the speech to text service from my local machine, and it worked well.

However, once i included the pronunciation assessment code, the program kept getting error. I tried the code in both JS and Python.

The error message from running the python code:

Traceback (most recent call last):
  File "C:\Users\Administrator\Documents\GitHub\AILanguageLearningApp\LambdaSTTV1_python\stt.py", line 32, in 
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,393 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 3,561 Reputation points
    2024-03-21T13:33:26.83+00:00

    Hello @Glen Wang,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Sequel to your questions, the error messages you provided indicate that there are issues with applying the pronunciation assessment configuration to your Azure Speech service.

    Firstly,

    RuntimeError: 5
    

    This error doesn't provide much information about what went wrong. However, it typically means that there was a problem with the configuration you provided.

    Secondly,

    TypeError: Cannot set properties of undefined (setting 'expectContentAssessmentResponse')
    

    This error suggests that there's an issue with setting the expectContentAssessmentResponse property of the PronunciationAssessmentConfig object.

    Now, to solve these problems. You have couple of things to do:

    1. Ensure that the versions of the Azure Speech SDK you're using in both Python and JavaScript are compatible with the Pronunciation Assessment feature. Sometimes, older versions might lack support for newer features. Using the latest version of the Azure Speech SDK for both Python and JavaScript. Updates often include bug fixes and improvements that might resolve the issues you're facing.
    2. Review the documentation for pronunciation assessment in both Python and JavaScript to ensure you're providing the correct configuration options. For example, in JavaScript, expectContentAssessmentResponse might not be a valid property.
    3. Double-check that your subscription key and service region are correctly set in both Python and JavaScript configurations. Incorrect credentials can lead to errors.

    Other things you can do is to create a good error handling mechanism in your code.

    By methodologically follow the steps above and address these points, you should be able to identify and resolve the issues you're encountering with Azure Speech Pronunciation Assessment in both Python and JavaScript.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam


0 additional answers

Sort by: Most helpful