🌐
Google
docs.cloud.google.com › ai and ml › cloud text-to-speech › cloud text-to-speech api
Cloud Text-to-Speech API | Google Cloud Documentation
June 27, 2025 - Synthesizes natural-sounding speech by applying powerful neural network models · To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API ...
🌐
Google Cloud
cloud.google.com › text-to-speech
Text-to-Speech AI: Lifelike Speech Synthesis | Google Cloud
October 1, 2025 - Convert text into natural-sounding speech using an API powered by the best of Google’s AI technologies.
Discussions

Google Text-To-Speech API - Stack Overflow
There is another preety interesting site with tts engines that can be used in this manner. ... There's a Google Text to Speech Service in Google Cloud. It is an API service. More on stackoverflow.com
🌐 stackoverflow.com
Google Adds Multi-Speaker TTS to AI Studio & API (Gemini 2.5 Pro/Flash) - Great for Podcasts!
It's amazing, but how do you download the audio? More on reddit.com
🌐 r/Bard
40
21
May 21, 2025
Google TTS voices
Is your en-US-Studio-Multispeaker still working? For some reason my app cant find it anymore More on reddit.com
🌐 r/googlecloud
3
1
August 22, 2024
Best Text to Speech API pricing wise
If you don't need streaming audio you might just want to use Gemini Flash to do that. More on reddit.com
🌐 r/googlecloud
2
3
July 4, 2024
🌐
Google AI
ai.google.dev › gemini api › speech generation (text-to-speech)
Speech generation (text-to-speech) | Gemini API | Google AI for Developers
1 week ago - The Gemini API can transform text input into single speaker or multi-speaker audio using native text-to-speech (TTS) generation capabilities.
🌐
npm
npmjs.com › package › google-tts-api
google-tts-api - npm
March 20, 2021 - Google TTS (Text-To-Speech) for node.js. Latest version: 2.0.2, last published: 5 years ago. Start using google-tts-api in your project by running `npm i google-tts-api`. There are 85 other projects in the npm registry using google-tts-api.
      » npm install google-tts-api
    
Published   Mar 20, 2021
Version   2.0.2
Author   zlargon
🌐
Google
docs.cloud.google.com › ai and ml › cloud text-to-speech › gemini-tts
Gemini-TTS | Cloud Text-to-Speech | Google Cloud Documentation
1 week ago - To enable the Cloud Text-to-Speech API for use with your project, click Enable. Set up authentication for your development environment. For instructions, see Set up authentication for Cloud Text-to-Speech. You can pick an endpoint based on Available regions. import os from google.cloud import texttospeech PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT") TTS_LOCATION = os.getenv("GOOGLE_CLOUD_REGION") API_ENDPOINT = ( f"{TTS_LOCATION}-texttospeech.googleapis.com" if TTS_LOCATION != "global" else "texttospeech.googleapis.com" ) client = texttospeech.TextToSpeechClient( client_options=ClientOptions(api_endpoint=API_ENDPOINT) )
🌐
Google Cloud
console.cloud.google.com › marketplace › product › google › texttospeech.googleapis.com
Cloud Text-to-Speech API – Marketplace
Spend smart, procure faster and retire committed Google Cloud spend with Google Cloud Marketplace. Browse the catalog of over 2000 SaaS, VMs, development stacks, and Kubernetes apps optimized to run on Google Cloud.
🌐
Google
blog.google › technology › developers › gemini-2-5-text-to-speech
Improving Gemini Text-to-Speech models for better control and capabilities
1 week ago - Gemini 2.5 Flash TTS and 2.5 Pro TTS models are available via the Gemini API in Google AI Studio.
🌐
Medium
arie-m-prasetyo.medium.com › getting-started-with-googles-cloud-text-to-speech-api-2f82c34f8b5c
Getting started with Google’s Cloud Text-to-Speech API | by Arie M. Prasetyo | Medium
August 8, 2025 - Several TTS options exist, from Hume.ai, Amazon Polly and OpenAI’s TTS model, to open-source tools like Coqui TTS and eSpeak NG. I chose Google Cloud’s Text-to-Speech for two main reasons: It offers high-quality voices for the Indonesian language (specific for my needs) Its free tier is generous enough for early experimentation · Before we can synthesize speech, we’ll need to set up Google’s API:
Find elsewhere
🌐
Google
docs.cloud.google.com › ai and ml › cloud text-to-speech
Cloud Text-to-Speech documentation | Google Cloud Documentation
RPC API · info · Pricing · Quotas and limits · Release notes · Getting support · Billing questions · Create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads. Try Cloud TTS free ·
🌐
Google Cloud
cloud.google.com › text-to-speech › pricing
Review pricing for Text-to-Speech | Google Cloud
Text-to-Speech is priced based on the number of characters sent to the service to be synthesized into audio each month. You must enable billing to use Text-to-Speech, and will be automatically charged if your usage exceeds the number of free characters allowed per month. For information about how to keep track of your character totals, see Monitoring API usage.
🌐
Google
codelabs.developers.google.com › codelabs › cloud-text-speech-python3
Using the Text-to-Speech API with Python | Google Codelabs
You can use the Text-to-Speech API to convert a string into audio data. You can configure the output of speech synthesis in a variety of ways, including selecting a unique voice or modulating the output in pitch, volume, speaking rate, and sample rate. Copy the following code into your IPython ...
🌐
Calvincchan
calvincchan.com › blog › 241125-google-tts-japanese
Generating a Japanese Voiceover Using Google Text-to-Speech API | Blog | Calvin C. Chan
November 25, 2024 - Learn how to generate a Japanese voiceover using the Google Text-to-Speech (TTS) API in the Google Cloud Platform (GCP).
Top answer
1 of 15
65

Old answer:

Try using this URL: http://translate.google.com/translate_tts?tl=en&q=Hello%20World It will automatically generate a wav file which you can easily get with an HTTP request through any .net programming.

Edit:

Ohh Google, you thought you could prevent people from using your wonderful service with flimsy http header verification.

Here is a solution to get a response in multiple languages (I'll try to add more as we go):

NodeJS

// npm install `request`
const fs = require('fs');
const request = require('request');
const text = 'Hello World';

const options = {
    url: `https://translate.google.com/translate_tts?ie=UTF-8&q=${encodeURIComponent(text)}&tl=en&client=tw-ob`,
    headers: {
        'Referer': 'http://translate.google.com/',
        'User-Agent': 'stagefright/1.2 (Linux;Android 5.0)'
    }
}

request(options)
    .pipe(fs.createWriteStream('tts.mp3'))

Curl

curl 'https://translate.google.com/translate_tts?ie=UTF-8&q=Hello%20Everyone&tl=en&client=tw-ob' -H 'Referer: http://translate.google.com/' -H 'User-Agent: stagefright/1.2 (Linux;Android 5.0)' > google_tts.mp3

Note that the headers are based on @Chris Cirefice's example, if they stop working at some point I'll attempt to recreate conditions for this code to function. All credits for the current headers go to him and the wonderful tool that is WireShark. (also thanks to Google for not patching this)

2 of 15
49

In an update to Schahriar SaffarShargh's answer, Google has recently implemented a 'Google abuse' feature, making it impossible to send just any regular old HTTP GET to a URL such as:

http://translate.google.com/translate_tts?tl=en&q=Hello%20World

which worked just fine and dandy previously. Now, following such a link presents you with a CAPTCHA. This also affects HTTP GET requests out-of-browser (such as with cURL), because using that URL gives a redirect to the abuse protection page (the CAPTCHA).

To start, you have to add the query parameter client to the request URL:

http://translate.google.com/translate_tts?tl=en&q=Hello%20World&client=t

Google Translate sends &client=t, so you should too.

Before you make that HTTP request, make sure that you set the Referer header:

Referer: http://translate.google.com/

Evidently, the User-Agent header is also required, but interestingly enough it can be blank:

User-Agent:

Edit: NOTE - on some user-agents, such as Android 4.X, the custom User-Agent header is not sent, meaning that Google will not service the request. In order to solve that problem, I simply set the User-Agent to a valid one, such as stagefright/1.2 (Linux;Android 5.0). Use Wireshark to debug requests (as I did) if Google's servers are not responding, and ensure that these headers are being set properly in the GET! Google will respond with a 503 Service Unavailable if the request fails, followed by a redirect to the CAPTCHA page.

This solution is a bit brittle; it is entirely possible that Google will change the way they handle these requests in the future, so in the end I would suggest asking Google to make a real API endpoint (free or paid) that we can use without feeling dirty for faking HTTP headers.


Edit 2: For those interested, this cURL command should work perfectly fine to download an mp3 of Hello in English:

curl 'http://translate.google.com/translate_tts?ie=UTF-8&q=Hello&tl=en&client=t' -H 'Referer: http://translate.google.com/' -H 'User-Agent: stagefright/1.2 (Linux;Android 5.0)' > google_tts.mp3

As you may notice, I have set both the Referer and User-Agent headers in the request, as well as added the client=t parameter to the querystring. You may use https instead of http, your choice!


Edit 3: Google now requires a token for each GET request (noted by tk in the querystring). Below is the revised cURL command that will correctly download a TTS mp3:

curl 'https://translate.google.com/translate_tts?ie=UTF-8&q=hello&tl=en&tk=995126.592330&client=t' -H 'user-agent: stagefright/1.2 (Linux;Android 5.0)' -H 'referer: https://translate.google.com/' > google_tts.mp3

Notice the &tk=995126.592330 in the querystring; this is the new token. I obtained this token by pressing the speaker icon on translate.google.com and looking at the GET request. I simply added this querystring parameter to the previous cURL command, and it works.

NOTE: obviously this solution is very frail, and breaks at the whim of the architects at Google who introduce new things like tokens required for the requests. This token may not work tomorrow (though I will check and report back)... the point is, it is not wise to rely on this method; instead, one should turn to a commercial TTS solution, especially if using TTS in production.

For further explanation of the token generation and what you might be able to do about it, see Boude's answer.


If this solution breaks any time in the future, please leave a comment on this answer so that we can attempt to find a fix for it!

🌐
YouTube
youtube.com › watch
How to Use Google Text-to-Speech API with Python on Google Cloud Platform (GCP) (2025) - YouTube
Learn how to use **Google Text-to-Speech API** via Google Cloud Platform (GCP) with Python in this step-by-step guide. Discover how to convert text into life...
Published   January 16, 2025
🌐
npm
npmjs.com › package › @google-cloud › text-to-speech
@google-cloud/text-to-speech - npm
Cloud Text-to-Speech API client for Node.js. Latest version: 6.4.0, last published: 2 months ago. Start using @google-cloud/text-to-speech in your project by running `npm i @google-cloud/text-to-speech`. There are 103 other projects in the npm registry using @google-cloud/text-to-speech.
      » npm install @google-cloud/text-to-speech