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 (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (4 months ago) RSS 2.0 feedStarStarStar 50%Total: 3,199 All time: 1,109 This week: 59Up
Version License PHP version Categories
php-text-to-speech 1.10GNU 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 is available for providing paid consulting. Contact Radovan Janjic .
Classes: 14 packages by
Country: Serbia Serbia
Age: 36
All time rank: 2382 in Serbia Serbia
Week rank: 19 Up1 in Serbia Serbia Up
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
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

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