I get this error when I try to use Google Speech from either the cmd command line (Windows 10) using curl
or from a local Firebase server.
"Cloud Speech API has not been used in project firebase-cli before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/speech.googleapis.com/overview?project=firebase-cli then retry"
Going to the suggested URL just gives the message:
The API "speech.googleapis.com" doesn't exist or you don't have permission to access it
The curl
command has worked before. Login seems to work (using Bearer
header). I have no idea why it does not work now. Did I do something before that made it work? Or is there some change to Firebase CLI/Google Speech?
EDIT: Here is the curl command that worked before. I do not think it matters here, but someone might be interested still:
@for /f %%i in ('gcloud auth application-default print-access-token') do @set bearer=%%i
curl -X POST ^
-H "Authorization: Bearer %bearer%" ^
-H "Content-Type: application/json; charset=utf-8" ^
--data @request-flac.json ^
"https://speech.googleapis.com/v1/speech:longrunningrecognize"