PHP Classes

PHP TTS Solution with PHP Text to Speech Class: Generate speech audio to say a given text

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-06-15 (Yesterday) RSS 2.0 feedStarStarStar 50%Total: 3,198 This week: 3All time: 1,109 This week: 25Up
Version License PHP version Categories
php-text-to-speech 1.11GNU General Publi...4.3Text processing, Audio
Description 

Author

This class can generate speech audio to say a given text.

It can send a HTTP request to the Google Translate API to say a given text.

The class downloads the speech audio in MP3 format and stores it in a given file.

Picture of Radovan Janjic
  Performance   Level  
Name: Radovan Janjic <contact>
Classes: 14 packages by
Country: Serbia Serbia
Innovation award
Innovation award
Nominee: 3x

Recommendations

Example

<?php

/**
* PHP_Text2Speech Class example
*/

include 'PHP_Text2Speech.class.php';

$t2s = new PHP_Text2Speech;

?>
<audio controls="controls" autoplay="autoplay">
  <source src="<?php echo $t2s->speak('Facebook is a very large social network where you can find a lot of people. You can also find there a community of PHP Classes site users.
If you are a member of Facebook you can join the PHP Classes site users community and follow the site activity updates that are posted on the site page wall.
Please click on the Like button in the PHP Classes site community page at Facebook so we can grow the community of site users at Facebook.'
); ?>" type="audio/mp3" />
</audio>


Details

PHP_Text2Speech

This class can generate speech audio to say a given text.

It can send a HTTP request to the Google Translate API to say a given text.

The class downloads the speech audio in MP3 format and stores it in a given file.


  Files folder image Files  
File Role Description
Files folder imageaudio (1 file)
Accessible without login Plain text file example.php Example Example script
Plain text file PHP_Text2Speech.class.php Class Class file
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  audio  
File Role Description
  Accessible without login Plain text file 4aa9c9af3a5a303c72be02150b5dc5dc.mp3 Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:3,198
This week:3
All time:1,109
This week:25Up
User Ratings User Comments (2)
 All time
Utility:70%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2624