Getting a Google

Text-to-Speech

API key

Instructions for getting your own API key directly from Google Cloud

This information is based on the beta version of Google's text-to-speech service (Oct 2020). It may get out of date over time.

This extension uses Google's amazing text-to-speech service; however, that Google service is only free for a limited amount of text, then it switches to a per-character cost.

The good news is that you'll not likely go over the generous free-quota; however, Google often gives you a $300 credit for the first few months to figure costs out.

Steps:

  1. Sign up for a free Google Cloud account

  2. Create a project

  3. Enable Text-to-Speech API

  4. Generate a Text-to-Speech API Key

  5. Input your key into this extension

  6. Set up budget alerts

DO NOT Share your API key with anyone else

Step 1. Sign up for a free Google Cloud account

To sign up for Google Cloud, you may need to provide a credit card to Google.

This is primarily to help stop abuse and you should a free credit from Google to start.

Click the button and follow the steps on the google site. You will need a Google gmail account and be logged into it.

Step 2. Create a new project on Google Cloud


Everything in Google Cloud need to be in a project. The name doesn't matter other than to help you identify it.

  1. Enter a project name

  2. Click Create button

After creating a project, you're dropped onto the Project Dashboard.

Just make sure the project at the top is set to your newly created one.

Step 3. Enable Text-to-Speech API

Next you'll need to enable the Text-to-Speech API for this project

https://console.developers.google.com/apis/api/texttospeech.googleapis.com/overview

  1. Verify project at top

  2. Click Enable button

It takes a few seconds, but after the API is enable, you're redirect to an API Dashboard. You'll want to bookmark this page for later use to check your quota use.

Step 4. Generate an API Key

The API Key is a secret code that controls who can use your text-to-speech. If you give this to anyone, they can use your speaking service and you'll get charged

  1. Enter any name. Since you'll be using for this entension, something like ReadMeTheText Ext is good.

  2. For restrictions, the easiest solution is to enter none.

  3. Do not click create just yet.

  1. Click the API Restrictions tab

  2. Select Cloud Text-to-Speech API from API Restrictions dropdown

  1. Verify Cloud Text-to-Speech appears in the list

  2. Click Create button

Step 5. Copy API Key and add to extension

After the key is generated, you will land on the Key Managenment page.

Extension Option page: chrome-extension://ohefbjijnlclhjfclaijbhnjaejeeeog/src/options.html

Scroll down and test that the api key works

Step 6. Create a Google Cloud Budget

To make certain you don't spend too much money, you should consider creating a Google Cloud Budget.

You should follow the instructions in this official Google guide to set up a budget with warnings if you exceed any cost.

Learn how to create a budget