Vanderlei Arruda
Vanderlei Arruda

Reputation: 3

401 - Access denied (Microsoft TTS API)

when i try to use Text To Speech i am get he error

{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }

i am using tne c# sample of Github: https://github.com/Azure-Samples/Cognitive-Speech-TTS/tree/master/Samples-Http/CSharp

and i am put the key 1 of azure free license:

Keys in Azure

enter image description here

but the message error keep going, someone can help me ?

thanks

Upvotes: 0

Views: 500

Answers (1)

cthrash
cthrash

Reputation: 2973

Depending on whether you're using the old or the preview version of Speech, you will need to access a different token-issuing endpoint. Based on your experience, you have must an API key for the old 'Bing' flavor, so you should modify the sample code thus:

Authentication auth = new Authentication("https://api.cognitive.microsoft.com/sts/v1.0/issueToken",
    "input your key here");

Upvotes: 0

Related Questions