stu*_*ent 6 android google-cloud-platform google-cloud-speech
我正在尝试使用 Google Cloud Speech 识别,但出现此错误
I/omputeEngineCredentials:无法检测我们是否在 Google Compute Engine 上运行。W/System.err: java.io.IOException: 应用程序默认凭据不可用。如果在 Google Compute Engine 中运行,它们就可用。否则,必须定义环境变量 GOOGLE_APPLICATION_CREDENTIALS 指向定义凭据的文件。有关 更多信息,请参阅 https://developers.google.com/accounts/docs/application-default-credentials。
我从系统属性/环境变量/用户变量设置环境变量,并且我使用本指南手动设置凭据。
我已经搜索了与此相关的每个主题,但我无法让它发挥作用。我错过了什么?
小智 0
如果无法访问日志和代码,很难说,但您可能应该从直接从控制台调试对语音 API 的访问开始。
gcloud auth activate-service-account --key-file=[PATH]
gcloud ml speech recognize 'gs://cloud-samples-tests/speech/brooklyn.flac' \ --language-code='en-US'
https://cloud.google.com/blog/products/ai-machine-learning/ml-explorer-talking-and-listening-with-google-cloud-using-cloud-speech-and-text-to-speech
可能的原因是: - API 被禁用, - 您使用的凭据不包含 ML 权限。- 凭证文件路径错误。
| 归档时间: |
|
| 查看次数: |
6329 次 |
| 最近记录: |