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.

Confirm the project for which you want to enable the API
Enable Text-to-Speech API

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

Step 6

To use the API you’ll need the right credentials. Go to APIs & Services>Credentials> Create credentials> Service account.

Create Service account
Add credentials to your project
Important

Don’t select the account and users access. No role is required to access this service.

Step 7

Go to the tab KEYS of the just created Service account> press ADD KEY>Create new key.

Create new key
Select JSON key type

Click Create and save the generated file on your computer.

Connecting the key file to the Voicer/Speaker Plugin

Step 1

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

Voicer Key File Settings
Voicer settings
Step 2

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

Select generated 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?