1
votes

any method i use to use the Speech-To-Text service from Microsoft fails me giving me as error:

Speech Recognition canceled: CancellationReason.Error
Error details: WebSocket Upgrade failed with a bad request (400). Please check the language name and endpoint id (if used) are correctly associated with the provided subscription key.

I have been using this library for days and out of nowhere it started giving me this problem. The access data are correct. The only thing I managed to understand is that the problem occurs only when I use one of these two methods:

speech_config.speech_recognition_language = "en_EN"
speech_config.endpoint_id = "my_endpoint_uri"

Has anyone run into my own problem and know how to fix it? Thanks in advance to everyone.

1
seems that "en_EN" is not valid - Thiago Custodio

1 Answers

1
votes

Have a look to the list of supported languages in the doc here.

There are several locales for english, but no EN. You should use en-US, en-GB (or another one) depending on your needs.

For endpoint_id field, it should be empty if you do not use "custom" speech, or have your deployment id if you use your own custom speech