microsoft / cognitive-services-speech-sdk-js

Microsoft Azure Cognitive Services Speech SDK for JavaScript
Other
252 stars 91 forks source link

[Bug]: SpeechConfig.FromEndpoint always cancel the connection with Invalid argument exception #794

Closed relaxkeren closed 4 months ago

relaxkeren commented 4 months ago

What happened?

I tried to create the SpeechConfig from the endpoint like the following SpeechConfig config = SpeechConfig.FromEndpoint(new Uri("https://eastus.api.cognitive.microsoft.com/"), "my_subscription_key");

When I triggered await recognizer.StartContinuousRecognitionAsync().ConfigureAwait(false);, it's always cancelled with error: Error Code: ConnectionFailure, Error Details: Invalid argument exception: You must specify a WS or WSS scheme for the endpoint SessionId: b4086b85509b4656981edc4b4423b037

I can't find any doc to describe where to find WS or WSS scheme and how to set it in the config.

Version

1.34.0 (Latest)

What browser/platform are you seeing the problem on?

Other

Relevant log output

Error Code: ConnectionFailure, Error Details: Invalid argument exception: You must specify a WS or WSS scheme for the endpoint SessionId: b4086b85509b4656981edc4b4423b037
relaxkeren commented 4 months ago

end point given in azure speech service console is https://eastus.api.cognitive.microsoft.com/ but it should be https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken. Should the sdk automatically add sts/v1.0/issuetoken based on the sdk version?