Wednesday 27 July 2016

PHP Convert Text to Audio

Spell text as MP3 audio using Google Translate



This class can spell text as MP3 audio using Google Translate.

It can take a given text string in an idiom and generates a MP3 audio stream using Google translate.

The class generates HTML with JavaScript to play the converted text in a Web page.

 Download
Example :-

<!doctype html> 
<html> 
<body> 
<center> 
<form method="post"> 
<h1>Text Reader</h1> 
<textarea name="testo_da_leggere"></textarea><br /> 
<input type="text" name="lingua_testo" placeholder="Codice lingua" /><br /> 
<input type="submit" value="Leggi" /> 
</form> 
</center> 
<?php 
include "text-reader.php"; 
$testo_da_leggere = ((isset($_POST['testo_da_leggere'])) ? $_POST['testo_da_leggere'] : "Inserisci un testo da leggere"); 
$lingua_testo = ((isset($_POST['lingua_testo'])) ? $_POST['lingua_testo'] : "it"); 
$textReader->Read($testo_da_leggere,$lingua_testo); 
?> 
</body> 

</html> 

No comments:

Post a Comment