PHP code example of ekandreas / sayit
1. Go to this page and download the library: Download ekandreas/sayit library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ekandreas / sayit example snippets
$factory = TextToSpeech::make(
$aws_key,
$aws_secret,
$aws_region,
$aws_bucket
)
->voice("Elin")
->engine('neural')
->generate("Hej på dig, det här kommer att läsas upp i en mp3 efter generering.")
->store("your-folder");
// the url now points to a public s3 folder "your-folder" with a unique mp3 file generated from the text above.
$url = $factory->url();