Azure-Samples / Cognitive-Speech-STT-Windows

Windows SDK for the Microsoft Speech-to-Text API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/speech-api
Other
112 stars 89 forks source link

LoginFailed, transport error #38

Closed ramicodes closed 6 years ago

ramicodes commented 6 years ago

I followed the steps listed in the instructions, ran the sample and got the following error: Error code: LoginFailed

Also, what value will the sample need for the AuthenticationUri key in app.config

ramicodes commented 6 years ago

if you can update the documentation to include some info on the Authentication URI The AuthenticationUri is used to receive a token from the authentication service. This URI must be set separately, as shown in the following sample code. // set the authorization Uri dataClient.AuthenticationUri = "https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken";

raaaar commented 6 years ago

AuthenticationUri is an optional parameter, default value is "https://api.cognitive.microsoft.com/sts/v1.0/issueToken". Were you able to solve the login issue by changing the uri?

ramicodes commented 6 years ago

still the same issue: Error received by OnConversationErrorHandler() --- Error code: LoginFailed Error text: Transport erro

raaaar commented 6 years ago

There's a text field in the right upper corner of the Sample where the key is supposed to go. Could you also try the REST API (https://github.com/Azure-Samples/SpeechToText-REST/blob/master/curl/transcribe.bat):

transcribe.bat <key> <wav file>

pravinkl commented 6 years ago

Do we have a solution for this issue?

zhouwangzw commented 6 years ago

We can repro the issue and we are currently looking into it.

zhouwangzw commented 6 years ago

I can now run the sample without seeing the error above. Could you please try again? If you still have the problem, could you check whether your subscription key is expired or exceeds the quota (in case you are using a free trial key)?

pereiraguilherme commented 6 years ago

I'm also having the same issue as @ramicodes had. I'm using a valid key and already tried the two keys given by Azure account. If you guys, solve this issue, let me know! Thanks!

zhouwangzw commented 6 years ago

@pereiraguilherme Could you please follow the steps described in Authentication for using the service to check whether you can get an Authorization token using one of you keys? Please note you need to verify for authorization token, but not just for subscription key. Could you please post error message in case of failure?

zhouwangzw commented 6 years ago

@pereiraguilherme And if can get an authorization token successfully using REST, then could you please check whether you have past the same subscription key in the text edit box and save it? On which platform, x86 or x64 are you running your sample?

shayben commented 6 years ago

@zhouwangzw did you verify that it works with the client libraries as well? Or just the REST api? I still see this issue.

zhouwangzw commented 6 years ago

I just ran the SpeechToText-WPF-Sample again, using my subscription key, and it works fine. You can check whether your key is still vaid by clicking on "Log in" at the page "Try Cognitive Services" (at the right side of the tab "Vision/Speech/Language/Knowledge/Search"), using the account you used to get the subscription key.

shayben commented 6 years ago

@zhouwangzw I only see my trial account on that page, which is expired. I do have a subscription and am using the correct subscription key (tried regenerating it as well), and still get the transport error message in the SpeechToText-WPF-Sample.

zhouwangzw commented 6 years ago

@shayben Do you mean that your trial account is expired? Could you please check whether your subscription key is expired too? It is only valid for a certain period of time and has a quota assoicated. Can you try to run the REST example, as described here with your key?

zhouwangzw commented 6 years ago

I am closing the isseu due to lack of response. Please open a new one if you still have issues.

miloush commented 6 years ago

For others hitting this error: Note that this is not a sample for the "Speech (preview)" service which uses Microsoft.CognitiveServices.Speech package, this one is for "Bing Speech" service that uses Microsoft.ProjectOxford.SpeechRecognition package. If you try to use this sample with "Speech (preview)" key you will get LoginFailed. The sample for Microsoft.CognitionServices.Speech package can be found at https://docs.microsoft.com/en-gb/azure/cognitive-services/speech-service/samples

Might be worth mentioning in the readme.

ImranMA commented 6 years ago

Thanks @miloush it's definielty a "Bing Speech" Api key that we need. I have successfully tested it. Make sure you also copy the end point and put it in AuthenticationUri webconfig propery and it looks like this. https://api.cognitive.microsoft.com/sts/v1.0/issueToken

SanaWaseem commented 5 years ago

@miloush how to resolve it

miloush commented 5 years ago

@SanaWaseem if you want to use cognitive services, don't use this sample. Use the one I linked to.

SanaWaseem commented 5 years ago

@miloush Can you please mention it?