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

Error on Execution of "Start Recognition" #48

Closed djtech2k closed 6 years ago

djtech2k commented 6 years ago

I have built and retrieved a LUIS endpoint. I have a Speech Services Key and it is stored in the app. The app builds, but as soon as I click "Start Recognition", I get repetitive error handling:

--- Error received by OnConversationErrorHandler() --- Error code: LoginFailed Error text: Transport error

What am I missing?

zhouwangzw commented 6 years ago

It looks like an authentication error. Have you tried your key with REST API for verification? More informaiton about authentication can be found here. It should be noted that the free trial key is valid only for a certain time and has a quota limit.

djtech2k commented 6 years ago

My subscription is not a trial.

I followed that link and ran the tests. When running the test of "Use an authorization token in a request", I get an error "Invoke-RestMethod : The remote server returned an error: (403) Forbidden.". I am able to retrieve the token just fine.

zhouwangzw commented 6 years ago

I just tried, it works for me with the example using authorization token. Please note that the authorization toke is only valid for 10 minutes.

djtech2k commented 6 years ago

I followed the article you posted. I used powershell to execute the tests that get the token, then use the token in a request. I ran then as a single piece of code, so timeout should not be an issue. I simply put in my subscription key and the path to a wav file. I looked at the variables used in the Invoke-RestMethod and all variables have a value. I do not know why I am getting this 403 Error.

djtech2k commented 6 years ago

I found the issue. For this github app, I was using the Speech Translator key and not the Bing Speech key. I put the Bing Speech Key into the app and it worked.

zhouwangzw commented 6 years ago

Glad to know that the problem is resolved. I am closing the issue. If you have any other problems, please feel free to open a new one.