Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
polly-s3
Advanced tools
Readme
polly-s3 is a node.js module which renders text-to-speech using AWS Polly and saves it to an audio file in an S3 bucket.
You can use this module to render Polly speech on-the-fly for use in voice applications. If the S3 bucket has a public access policy, the rendered speech will be available at an HTTPS URL, suitable for use in an Alexa skill.
So far it has mostly been used in AWS Lambda functions - an understanding of how to run code in an AWS context will come in handy while using this module.
npm install polly-s3
polly-s3 requires some configuration to be set before it will work properly.
The name of an S3 bucket to hold rendered speech files needs to be set in either an environment variable named AWS_S3_DEFAULT_BUCKET
or passed in an options object to new PollyS3()
, e.g new PollyS3({ s3Bucket : 'someBucketName' })
.
polly-s3 also needs to use an AWS IAM role which has rights to both use Polly and write to the specified S3 bucket. If running on AWS Lambda, you can create this IAM role and assign it to the Lambda function. If running elsewhere, you'll need to provide credentials using one of the methods described in the AWS SDK for JavaScript docs.
Similarly, the AWS region needs to be set. Information about that is also in the AWS SDK for JavaScript docs.
If you need to pass any options to the constructors for the Polly or S3 SDKs, you can pass a combined options object to the polly-s3 constructor; this object will be passed on to the Polly and S3 constructors.
var PollyS3 = require('polly-s3');
var p = new PollyS3();
var sentence = "Is this thing on?";
p.renderSentence( sentence, null, function( err, url ){
if( err ) throw(err);
console.log( "Rendered speech is at URL:", url );
});
Render some speech.
Parameters:
List Polly voices for a given language.
Returns data as described in the AWS Polly docs.
Parameters:
en-US
. Can be a single string or an array, e.g. [ 'en-GB', 'en-US', 'en-AU', 'en-IN', 'en-GB-WLS' ]
for all English voices.Fetch description for one voice, chosen at random from all in a given language.
Returns data as described in the AWS Polly docs.
Parameters:
en-US
. Can be a single string or an array, e.g. [ 'en-GB', 'en-US', 'en-AU', 'en-IN', 'en-GB-WLS' ]
for all English voices.Henry Cooke me@prehensile.co.uk http://github.com/prehensile
FAQs
polly-s3 - A library which uses AWS Polly to render text to speech to audio files in an S3 bucket.
The npm package polly-s3 receives a total of 1 weekly downloads. As such, polly-s3 popularity was classified as not popular.
We found that polly-s3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.