Documentation
Google Cloud Text-to-Speech JSON Key Guide
-
Access Google Cloud Console: Open your web browser and go to the Google Cloud Console. This is the central hub where you can manage all your Google Cloud resources.
-
Select or Create Your Project: At the top of the screen, there's a project selector. Click on it to open a dropdown list of all your Google Cloud projects.
- If you already have a project that you wish to use for Text-to-Speech, find and select it.
- If you do not have a project, click on "New Project" at the top of the dropdown menu. Enter a project name, and optionally, edit the project ID. Select or create an organization/folder if necessary, then click "Create."
-
Enable Text-to-Speech API: Once your project is selected or created, use the search bar at the top of the Google Cloud Console to search for "Text-to-Speech API." Click on the API from the search results, then click "Enable" to activate the API for your project.
-
Navigate to APIs & Services: On the left-hand menu of the Google Cloud Console, you'll find an option labeled "APIs & Services." Click on it to expand the menu, then select "Credentials." This section allows you to manage and create credentials like API keys, OAuth 2.0 client IDs, and service account keys that your applications can use to authenticate and access Google Cloud APIs.
-
Access Credentials Page: Once you're in the "Credentials" section, you will see a list of existing credentials associated with your project. To create a new service account key (which is what the JSON file essentially is), you'll need to navigate to the "Service accounts" section.
-
Create Service Account: Inside the "Service accounts" page, click on the "Create Service Account" button. You'll be prompted to enter details such as the service account name and description. Fill in the required information and click "Create."
-
Grant Access to Your Service Account: After creating your service account, you'll need to grant it access to the necessary roles. You can do this by selecting the appropriate roles that will allow the service account to use the Text-to-Speech API. Common roles include "Owner," "Editor," or specific roles like "Text-to-Speech User."
-
Generate the JSON Key: Once the service account is created and roles are assigned, you'll have the option to create a new key. Click on "Add Key," then choose "JSON" as the key type. After confirming your choice, the JSON key file will be automatically downloaded to your computer.
-
Secure Your JSON Key: The downloaded JSON file contains sensitive information that allows access to your Google Cloud resources. Keep it secure and do not share it publicly.