Loading...
 
Gmail / Facebook Style Chat Application


Posted: Friday 25th of July 2014

Convert text via Google to voice using Jquery and PHP



This tutorial teaches you how to convert Text To Speech via Google API using Jquery and PHP.

The system sends a HTTP GET request to Google Speech URL that does the conversion of text to an MP3 audio file as an out put.

Below is a sample URL through which the request to Google is made.

http://translate.google.com/translate_tts?ie=UTF-8&q=The text to convert&tl=en&total=4&textlen=19

Explanation for the above URL is shown below:

(1) ie -> This is the encoding format used. The default as seen in the URL above is: UTF-8
(2) q -> This is the query string. URL encoding is a necessity for this field especially when the string contains special characters.
(3) tl -> This is the language to which the conversion will be done. This means the mp3 audio file will be read in this language. You can get the list of Google supported languages here https://developers.google.com/translate/v2/using_rest#language-params
(4) total -> This is the total of words to be converted.
(5) textlen -> This is the lenghth of text to be converted. The maximum is 100 characters.

This is a very simple to understand application as all you need to do are well explained in the script.

There is no special installation or configuration needed to use the system, all you need to do is to upload the files to your server or transfer the codes to your existing website and you are good to go.

The script is very easy to understand and customize with programming code comments to ease usability.

To see the system in action, please click on the demo button below and download the script if you like what you see.







That's it guys...


Views Today: 1
Total Views: 2500

Comments
0
OUR OBJECTIVE

Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.

OUR MISSION

We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.

Copyright © 2011 - 2024 | All Rights Reserved