<?php
include 'PHP_Text2Speech.class.php';
$t2s = new PHP_Text2Speech;
?>
<audio controls="controls" autoplay="autoplay">
<source src="<?php echo $t2s->speak("Hello PHPGang");?>" type="audio/mp3" />
</audio>
<?php
include 'PHP_Text2Speech.class.php';
$t2s = new PHP_Text2Speech;
?>
<audio controls="controls" autoplay="autoplay">
<source src="<?php echo $t2s->speak("Hello PHPGang");?>" type="audio/mp3" />
</audio>
1
2
3
|
if (!file_exists($this->mp3File)) {
$this->download("http://translate.google.com/translate_tts?ie=UTF-8&q={$this->text}&tl={$this->lang}&total={$this->wordCount}&idx=0&textlen={$this->textLen}", $this->mp3File);
}
|
?> | http://www.phpgang.com/how-to-convert-text-to-mp3-voice_284.html |
No hay comentarios:
Publicar un comentario