How to get Google Text-to-Speech API Key File

Different voice plugins that use Google Cloud Text-to-Speech API require adding your own API key. In this quickstart, you set up your get Key File for Google Cloud Platform project and authorization and then request for the Text-to-Speech API to create audio from text.

Creating the Google Cloud Key File

If you are a beginner and have never worked Google Cloud before, you will read and accept the Google Cloud Platform Terms of Service and any applicable services and APIs

Step 1

Everything is ready to begin the process of getting the key file. Visit the Google Cloud Platform project to select or create a new project

Step 2

Click + Create Project button to create a new Google Cloud Project. Go to Step 4, if you have already created a project.

Create a New Project
Create a New Project

Set a unique name for your project, or use default project name. And click the Create button. Please note that the name of the project cannot be changed later.

Create a new project
Create a new project
Step 3

After creating the project visit Project Dashboard page.

Select your project
Select your project
Step 4

Visit the Billing tab to make sure that billing is enabled for your Google Cloud Platform project. Check out Google Cloud resource prices and quotes. You can use a free quote when using Voicer or pay if you use a plugin on a high-load WordPress website.

Project billing settings
Project billing settings

Link a billing account to your project. Learn how to enable billing in Google Cloud Project.

Important

Set the Budget Alerts to control the use of quotas and debits.

Step 5

Enable Text-to-Speech API for your project. If you want to save audio files not only locally but also on Google Drive, you can also add Google Drive API at this step.

Enable Text-to-Speech API
Enable Text-to-Speech API

Cloud Text-to-Speech API has been enabled for your project

Text-to-Speech API is enabled
Text-to-Speech API is enabled
Step 6

To use the API you’ll need the right credentials.

Add credentials to your project
Add credentials to your project

Click What credentials do I need? to proceed. Then click Create credentials -> Service account key

Voicer Key File Create Credentials
Create Service account key
Step 7

From the Service account list, select New service account. In the Service account name field, enter a name.

Create key file
Create key file
Important

Don’t select a value from the Role list. No role is required to access this service.

Click Create. A note appears, warning that this service account has no role.

Voicer Key File Creation
Service account role

Click Create without role. A JSON file that contains your key downloads to your computer

After this, the Key File will be generated and saved on your computer. You can find it in your browser’s download folder.

Connecting the key file to the Voicer Plugin

Step 1

Visit your WordPress website Admin Panel an open the plugin settings. Go to Settings -> Voicer

Voicer Key File Settings
Voicer settings
Step 2

Click Select Key File and upload your Key File to the WordPress media library.

Voicer API Key File
Voicer API Key
Step 3

Click Save Changes for the changes to take effect.

That’s all for getting the Key File. Learn more about how to Install WordPress Plugin and customize the plugin from the article Voicer Plugin Settings.

Was this article helpful to you?