401 - 访问被拒绝(Microsoft TTS API)
401 - Access denied (Microsoft TTS API)
当我尝试使用 Text To Speech 时出现错误
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
我正在使用 Github 的 c# 示例:https://github.com/Azure-Samples/Cognitive-Speech-TTS/tree/master/Samples-Http/CSharp
我得到了 azure 免费许可证的密钥 1:
Azure 中的密钥
但是消息错误一直存在,有人可以帮助我吗?
谢谢
根据您使用的是旧版还是预览版的 Speech,您将需要访问不同的令牌颁发端点。根据你的经验,你必须有一个 API 旧 'Bing' 风格的键,所以你应该修改 the sample code 这样:
Authentication auth = new Authentication("https://api.cognitive.microsoft.com/sts/v1.0/issueToken",
"input your key here");
当我尝试使用 Text To Speech 时出现错误
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
我正在使用 Github 的 c# 示例:https://github.com/Azure-Samples/Cognitive-Speech-TTS/tree/master/Samples-Http/CSharp
我得到了 azure 免费许可证的密钥 1:
Azure 中的密钥
但是消息错误一直存在,有人可以帮助我吗?
谢谢
根据您使用的是旧版还是预览版的 Speech,您将需要访问不同的令牌颁发端点。根据你的经验,你必须有一个 API 旧 'Bing' 风格的键,所以你应该修改 the sample code 这样:
Authentication auth = new Authentication("https://api.cognitive.microsoft.com/sts/v1.0/issueToken",
"input your key here");