You are here: Webestools > Forum > Web Sites > PHP/MYSQL > TTS in php

TTS in php


To create and answer topics, you must to be logged.
Pages: 1
Author Message
linanur
Date08/11/2011 at 05:43:03

My avatar
My Group
Hi, I've went to this site Open Sourced TTS and downloaded the contents.

However, I kept on getting errors with "Notice: Use of undefined constant txt - assumed 'txt' in C:\xampp\htdocs\TTS\r_ajax.php on line 10" I need to know whether anyone in this forum have tried this. I really need help in this TTS in PHP. Can anyone help me?

ybouane
Date12/11/2011 at 11:06:05

My avatar
My Group
Hi,
use this code in the page r_ajax.php:
Code: PHP
<?php

header('Content-type: text/html; charset=ISO-8859-2');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . date('r'));
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

$txt = urlencode(trim(strip_tags($_GET['txt'])));

?>

  <object id="Player" height="100" width="320" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=7,0,0,0">
   <param name="URL" value="example_2.php?txt=<?php echo $txt; ?>">
   <param name="FileName" value="example_2.php?txt=<?php echo $txt; ?>">
   <param name="TransparentAtStart" value="-1">
   <param name="AutoStart" value="true">
   <param name="AnimationatStart" value="1">
   <param name="ShowControls" value="1">
   <param name="enablecontextmenu" value="1">
   <param name="autoSize" value="true">
   <param name="displaySize" value="1">
   <param name="Volume" value="100">
   <param name="uiMode" value="mini">
   <param name="enablecontextmenu" value="0">
   <embed src="example_2.php?txt=<?php echo $txt; ?>" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="320" height="100" autostart="1" showcontrols="1" showstatusbar="1" showdisplay="1" autorewind="1" enablecontextmenu="1" loop="1" volume="100"></embed>
  </object>


Cordially :)

linanur
Date12/11/2011 at 14:38:29

My avatar
My Group
Oh, thanks a lot ybouane :)

That solution solved the txt error, but somehow when I tried playing it, the voice didn't come up. Did it work when you tried it?

smithdavid
Date18/03/2012 at 08:02:17

My avatar
My Group
I Updated

Thanks to sharing....

Pages:1


There is 27 online user(s)
Page generated in 0.00358 seconds
Top
Rules - Contact us - Help us - RSS News
Copyright © Webestools - Any full or partial copy of our creations is prohibited without the permission of it authors.
All quoted trademarks belong to their respective companies.