ekandreas / sayit
Converts text to speech via AWS and place it in a S3 bucket folder
Fund package maintenance!
ekandreas
Requires
- php: ^8.0
- aws/aws-sdk-php: *
- guzzlehttp/guzzle: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^1.22
- phpunit/phpunit: ^9.5
- spatie/ray: *
- vimeo/psalm: *
- vlucas/phpdotenv: ^5.5
README
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();
Installation
You can install the package via composer:
composer require ekandreas/sayit
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.