[英]can't set up speech-to-text GCP api
I've been struggling to transcribe audio to text in Python.我一直在努力用 Python 将音频转录为文本。 Here's what I've done so far:
这是我到目前为止所做的:
os.environ["GOOGLE_APPLICATION_CREDENTIALS"]='C:\\Python\\Python37\\Lib\\site-packages\\google\\Borster.json'
in Jupyter, otherwise when I do it with set
in the cmd, the variable disappears when I reopen cmd)os.environ["GOOGLE_APPLICATION_CREDENTIALS"]='C:\\Python\\Python37\\Lib\\site-packages\\google\\Borster.json'
,否则当我在cmd中set
,当我重新打开cmd时变量消失)enums.py
file.enums.py
文件。 I haven't been programming for too long so I'm very confused with this API and this whole Google Cloud platform in general.我编程的时间不长,所以我对这个 API 和整个谷歌云平台非常困惑。 If there's anything else helpful I could share, please tell me.
如果还有其他有用的东西我可以分享,请告诉我。 I've been struggling for 3 days but nothing going.
我已经挣扎了 3 天,但没有任何进展。
The service account that you create does not have permission to your bucket.您创建的服务帐号无权访问您的存储桶。 The error message states that the the
list
permission is missing.该错误消息指出缺少
list
权限。
The solution is to use the Google Cloud Console (or the CLI) and add the appropriate role to the service account.解决方案是使用 Google Cloud Console(或 CLI)并将适当的角色添加到服务帐户。
Granting, changing, and revoking access to resources 授予、更改和撤销对资源的访问权限
Select one of the Cloud Storage roles listed on this page:选择此页面上列出的 Cloud Storage 角色之一:
IAM roles for Cloud Storage Cloud Storage 的 IAM 角色
The service account will need roles/storage.objectViewer服务帐户将需要roles/storage.objectViewer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.