Mahmut Namli - 2014-01-16 23:53:15 -
In reply to message 1 from Robert Lefebure
Firstly you need to save codes in Class' index.php as a separate file (example: sound.php),
Handle $_GET['lang'] and $_GET['word'] in your sound.php file and your text method will be like this:
$ttsObj->text($_GET['lang'], $_GET['word']);
Then you can use it on each of your examples like this:
<audio controls>
<source src="sound.php?lang=en&word=example" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Don't forget to handle GET security issues.
You'll be done..