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

In VIsual Studio 2017 getting the error LoginFailed transport error #53

Closed frajos100 closed 5 years ago

frajos100 commented 6 years ago

In VIsual Studio 2017 getting the error LoginFailed transport error error

jpalo commented 6 years ago

I can confirm the same LoginFailed error. Just registered F0 service (tried with both Speech (preview) and Custom Speech(preview)) on Azure, tried North Europe and North America token endpoints in the sample app (such as https://northeurope.api.cognitive.microsoft.com/sts/v1.0/issueToken).

I can get the token fine with my key using PowerShell:

$FetchTokenHeader = @{
  'Content-type'='application/x-www-form-urlencoded';
  'Content-Length'= '0';
  'Ocp-Apim-Subscription-Key' = 'MYKEY'
}

$OAuthToken = Invoke-RestMethod -Method POST -Uri https://northeurope.api.cognitive.microsoft.com/sts/v1.0/issueToken -Headers $FetchTokenHeader

# show the token received
$OAuthToken
the-nose-knows commented 5 years ago

Is there a workaround for this @frajos100 @jpalo ?

frajos100 commented 5 years ago

We need to use the Bing Speech API rather than the Azure Speech API.

jpalo commented 5 years ago

Are those not 2 totally different things?

frajos100 commented 5 years ago

For the sample in this GitHub repository we need to use the Bing Speech API key and not the Azure Speech API key.

cindy951357 commented 5 years ago

From the official page, I can not distinguish between Bing and Azure speech API. Can some one help me find out the correct API?

zhouwangzw commented 5 years ago

We recommend to use the new Speech Service API. And you can find samples for new Speech Service API here: