PHP code example of cidilabs / aws-polly
1. Go to this page and download the library: Download cidilabs/aws-polly 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/ */
cidilabs / aws-polly example snippets
$polly = new AwsPollyFileConversionProvider();
$fileUrl = "https://cidilabs.instructure.com/files/295964/download?download_frd=1&verifier=RZwKCP3iVlNQIULZnTAXO0usUROMC9AuplKkDf2g";
$options = array('fileUrl' => $fileUrl, 'fileType' => 'pdf', 'format' => 'mp3', 'fileName' => 'Test1.pdf', 'S3Bucket' => 'polly' , 'voice' => 'Joanna', 'TextType' => 'ssml', 'text' => 'sample text');
$polly->convertFile($options);