Before You Begin

Text-to-Speech is an API that is powered by Google's artificial intelligence (AI) technology. You send your transcript data to Text-to-Speech in an API call, then receive natural-sounding, synthetic human speech as playable audio in response. For more information on how Text-to-Speech works, see the basics page.

We provide code samples that show you how to make a request to the API and receive a response. You can learn how to use these samples by following the Text-to-Speech quickstarts and how-to guides.

This guide walks you through the steps necessary to start sending requests to the Text-to-Speech API.

Overview

Before you can begin using Text-to-Speech, you must enable the API in the Google Cloud Platform Console. The steps below walk you through the following actions:

  • Enable Text-to-Speech on a project.
  • Make sure billing is enabled for Text-to-Speech.
  • Set up authentication for your development environment.

Set up your Google Cloud Platform project

  1. Sign in to Google Cloud console

  2. Go to the project selector page

    You can either choose an existing project or create a new one. For more details about creating a project, please see the Google Cloud Platform documentation.

  3. If you create a new project, you will be prompted to link a billing account to this project. If you are using a pre-existing project, make sure that you have billing enabled.

    Learn how to confirm that billing is enabled for your project

  4. Once you have selected a project and linked it to a billing account, you can enable the Text-to-Speech API. Go to the Search products and resources bar at the top of the page and type in "speech". Select the Cloud Text-to-Speech API from the list of results.

  5. To try Text-to-Speech without linking it to your project, choose the TRY THIS API option. To enable the Text-to-Speech API for use with your project, click ENABLE.

  6. Set up authentication for your development environment. For instructions, see Set up authentication for Text-to-Speech.

Disable the Text-to-Speech API

To disable the Text-to-Speech API, navigate to your Google Cloud Platform dashboard and click on the Go to APIs overview link in the APIs box. Click on the Text-to-Speech API, then select the DISABLE API button at the top of the page.

What's next

Learn how to send a transcription request to the Text-to-Speech API using client libraries or the command line.