Text to Speech

Building a php script for festival E-mail

Building a PHP script for Festival

To build a PHP front-end for text-to-speech processing, we'll create a HTML form that contains a textarea for what you want converted to speech, a text input field for the volume scale, and a checkbox whether to convert the WAV output to a MP3 file. I added a lot of comments for you to see what each part of the code does so I won't explain it here in great detail. All you need to know is that you type some text in the textarea, adjust the volume if you want and select whether output is MP3 or WAV. Once you click the Text-To-Speech button, the form performs a postback and the form data is captured and processed. The textarea data is written to a temp file for text2wave to convert and text2wave is executed using the PHP exec function. If the MP3 option is selected, a second exec is used to convert the WAV to MP3 using LAME. When the page reloads there is a link to the audio file next to the submit button. You can click on it to listen or right-click, 'Save Target As' to download it.

Click here for script

Comments (5)Add Comment
...
written by somana, March 09, 2009
what all enviroment needed for my pc so that this code works, can u explain me in details
...
written by sam, July 02, 2009
if you want to make it work on your pc, you will need to have a linux server installed on it, and then install the required software.
...
written by ravi sharma, March 01, 2011
Hello,

We have looked at your api and we are very impressed by it. Is it possible if you could provide the same API in PHP so it could be integrated in our application seamlessly. Please get back to us as soon as possible. We would like to do business with you. Little description about our product, we are building web application for young kids so they could learn English, they will be clicking on the icons provided by the system thereafter they will have to spell it out after hearing them.

Regards & Thank You,
Ravi Sharma
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
PHP Developer
SoftoBiz Corporation

...
written by sam, April 26, 2011
this api is in php. Of course the back end is festival which runs on linux. I think i did not understand what you desire, very clearly
...
written by Falak, August 24, 2011
I found similar work done at the following address:
http://sourcecodemania.com/201...with-php/

Isn't it what is been discussed here.

Write comment
smaller | bigger

security code
Write the displayed characters


busy
 
Next >