Posted in PHP

Convert text to MP3 speech using Google API

Convert text to MP3 speech using Google API Posted on June 14, 2014Leave a comment

Deepanker Verma is the CEO of Techlomedia and a full time blogger. On this blog, he shares web design resources, SEO tips blog monetization tips.

Text 2 speech
Best WordPress Hosting

In this post, I am going to write about text to voice conversion. For this, I will Google’s TTS (Text to speech) API. It will translate your text to an mp3 file. And you can simply plat this mp3 file. It is worth to note that Google’s text to speech API supports more than 50 languages. So, you can try this in your local languages.

Text 2 speech

Use of the API is very simple. You just need to call the API via the simple get request.

And this will send a MP3 file in responce

Advertisement

Get the MP3 content and save it in a file.

Now use audio tag to embed and play this audio file in the browser.

I created a demo page where you can see this API working live.

Demo

advertisement

Deepanker Verma is the CEO of Techlomedia and a full time blogger. On this blog, he shares web design resources, SEO tips blog monetization tips.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Receive fresh web design resources and SEO tips in your email by our weekly newsletter

You have Successfully Subscribed!