我在google雲語音api中使用python我在ubuntu和windows上執行了「How to use google speech recognition api in python?」中的所有步驟,以及當我嘗試運行簡單腳本時在這裏 - 「https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/api/speech_rest.py」谷歌雲語音api在嘗試使用時投擲403
我得到了一個錯誤: <HttpError 403 when requesting https://speech.googleapis.com/$discovery/rest?version=v1beta1 returned "Google Cloud Speech API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/speech.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.">
是什麼奇怪的是,我不要被名字有項目「cloudsdktool」
我跑「gcloud初始化」,並將我在創建服務帳戶密鑰時獲得的json文件鏈接到「gcloud auth a ctivate服務帳戶--key文件= jsonfile」命令, 我試圖在Linux創建谷歌憑據環境變量,我仍然得到同樣的按摩
相關討論https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/706。看起來你需要一個JSON文件的身份驗證。 –
[Google Vision API文本檢測Python示例使用項目可能重複:「google.com:cloudsdktool」,而不是我自己的項目](http://stackoverflow.com/questions/38048320/google-vision-api-text-detection -python-example-uses-project-google-comclouds) –