I am attempting to set up Google Cloud Text-to-Speech API following these instructions - https://cloud.google.com/text-to-speech/docs/quickstart I have successfully followed steps 1-6 for setting up Google SDK and authenticating with service account credentials. However, when I attempt to run the sample HTTP request for synthesising speech I receive the following error:
Cloud Text-to-Speech API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/texttospeech.googleapis.com/overview?project=usable-auth-library then retry.
When following the link in the error message it leads to the following page:
The API "texttospeech.googleapis.com" doesn't exist or you don't have permission to access it.
I am grateful for help.
usable-auth-library
project instead of your actual project. My guess is that's due to how the credentials are being used. Have you tried setting theGOOGLE_APPLICATION_CREDENTIALS
environment variable to the location of your service account JSON file instead? – Jon Skeetapplication-default
out of there, does that help? If you were planning on using a client library, it might be worth skipping straight to that, as that may make it easier to make sure you're really using the service account credentials. – Jon Skeet