The Unofficial Google Text-To-Speech API

Do you want to create your own Text-To-Speech convertor? Well, you may want to directly use Google “Unofficial” API to convert Text to Speech. Google Translate had announced few weeks back some new enhancements. Where a new feature was added that can convert the text into speech. Now the hack is, you can use the same feature to convert your own text into speech and generate a mp3 out of it. All you have to do it to construct a URL and hit it from browser. For example, if I want to convert text “Hello World” in speech, I will write following url in browser.
http://translate.google.com/translate_tts?q=Hello+World
Code language: HTML, XML (xml)
And that’s it. This will generate an MP3 file which you can download and play. You may want to create a small HTML form to convert text to speech. All you need is to copy following code and create a HTML file in your machine. And run it using any browser.
<form method="get" action="http://translate.google.com/translate_tts"> <textarea name="q"></textarea> <input type="submit" value="Text-To-Speech"></input> </form>
Code language: HTML, XML (xml)
Currently, This “Unofficial” API is limited to 100 characters only. Also I am not till when google will support this API. Source: Ajaxian

View Comments

Share
Published by
Viral Patel
Tags: google google translate text-to-speech

Recent Posts

  • Java

Java URL Encoder/Decoder Example

Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…

4 years ago
  • General

How to Show Multiple Examples in OpenAPI Spec

Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…

4 years ago
  • General

How to Run Local WordPress using Docker

Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…

4 years ago
  • Java

Create and Validate JWT Token in Java using JJWT

1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…

4 years ago
  • Spring Boot

Spring Boot GraphQL Subscription Realtime API

GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…

4 years ago
  • Spring Boot

Spring Boot DynamoDB Integration Test using Testcontainers

1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…

4 years ago