我需要您的帮助来了解如何访问我的云存储。我使用Unity,并阅读了文档(我承认,不是全部)。我没有将文件上传到存储的问题。我在其中保存了音频文件,以便通过以下HTTP请求使用Google Cloud Speech Api进行识别:https://speech.googleapis.com/v1/speech:longrunningrecognize?key= + MySpeechApiKey
我正尝试发送此邮件:
"{"config": {"encoding":"LINEAR16","sampleRateHertz":44100,"languageCode":"ru-RU","maxAlternatives":1,"profanityFilter":false,"speechContexts":[{"phrases":[""]}],"enableWordTimeOffsets":false},
"audio":{"uri":"gs://calm-vine-195513.appspot.com/2018.7.28_10_1_16_382.flac"}}
我收到请求:
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
值得考虑的是,我在Firebase中制定了规则:
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}
我发现了一些提示,提示我需要某种服务帐户。我该怎么办?我是否需要在请求URI中添加一些密钥或其他内容?
答案 0 :(得分:0)
我遇到了同样的问题,并通过以下方式解决了该问题:
1)您必须安装 gcloud 和 gsutil
2)然后在命令提示符下运行 gcloud init 。在这里您必须配置配置
3)运行 gsutil iam ch allUsers:objectViewer gs:// your_bucket
对我有用=)