gpt4 book ai didi

python - 请求 Bing Text to Speech API 时出现 401 Unauthorized

转载 作者:太空宇宙 更新时间:2023-11-04 02:19:36 29 4
gpt4 key购买 nike

我正在使用 Azure-Samples github 中的这个示例。 https://github.com/Azure-Samples/Cognitive-Speech-TTS/blob/master/Samples-Http/Python/TTSSample.py

我用自己的 api key 替换了 api key ,但出现 401 错误。

这是 API 的响应代码和回复。

401 Unauthorized
Response text: b''

以下是我使用的路径:

token_host = "api.cognitive.microsoft.com"
token_path = "/sts/v1.0/issueToken"
speech_host = "westus.tts.speech.microsoft.com"
speech_path = "/cognitiveservices/v1"

enter image description here

知道发生了什么吗?

最佳答案

关于python - 请求 Bing Text to Speech API 时出现 401 Unauthorized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51927838/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com