gpt4 book ai didi

text-to-speech - 使用 google cloud api 时的计费/配额问题

转载 作者:行者123 更新时间:2023-12-03 19:18:07 25 4
gpt4 key购买 nike

虽然我已经启用了计费并设置了文本转语音的配额,但我从谷歌云收到了这个错误,任何人都可以帮助我吗?

enter image description here
enter image description here

您的应用程序已使用来自 Google Cloud SDK 或 Google Cloud Shell 的最终用户凭据进行身份验证,而 texttospeech.googleapis.com 不支持这些凭据。我们建议在 gcloud 中配置 billing/quota_project 设置或通过 auth/impersonate_service_account 设置使用服务帐户。有关服务帐户以及如何在您的应用程序中使用它们的更多信息,请参阅 https://cloud.google.com/docs/authentication/ .

最佳答案

IIUC,您误读了指南。

回复说您可能无法使用(您的)最终用户凭据(即 something@gmail.com 或您的某些 Google Apps 域的电子邮件地址)进行身份验证。

相反,您必须使用 Google Service Account 进行身份验证.

我假设 (!?) Text-to-Speech 服务最常被软件使用,而不是供人类直接使用。

最好的解决方案是创建一个服务帐户并使用应用程序默认凭据以该帐户身份运行代码。该指南提供了使用 gcloud auth activate-service-account 的替代方案(有效但不理想)。 :

看:

https://cloud.google.com/text-to-speech/docs/quickstart-protocol
https://cloud.google.com/docs/authentication/production
https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account

关于text-to-speech - 使用 google cloud api 时的计费/配额问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60072271/

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