Converts text to speech via AWS and place it in a S3 bucket folder This package is PHP agnostic. Follow these steps to get started:
composer require ekandreas/sayit
- Register an IAM programmatic account and set policy S3 full access and Polly Full Access to it.
- Use the key, secret, region and bucket name with the factory helper.
- Open a public folder in your S3 bucket and create a folder in it.
Code example:
$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();
You can install the package via composer:
composer require ekandreas/sayit
composer test
The MIT License (MIT). Please see License File for more information.