Menu
Amazon Polly
Developer Guide

Installing the Plugin

Setting up the Amazon Polly plugin for WordPress requires that you have an active AWS account in addition to your working WordPress installation. If you don't have an account, see Step 1.1: Sign up for AWS. When you have an AWS account, follow these steps to finish setting up the plugin:

Create a Permissions Policy

In the AWS Management Console, create an IAM permissions policy called PollyForWordPressPolicy using the following JSON code:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "Permissions1", "Effect": "Allow", "Action": [ "s3:HeadBucket", "polly:SynthesizeSpeech", "polly:DescribeVoices" ], "Resource": "*" }, { "Sid": "Permissions2", "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketAcl", "s3:GetBucketPolicy", "s3:PutObject", "s3:DeleteObject", "s3:CreateBucket", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::audio_for_wordpress*", "arn:aws:s3:::audio-for-wordpress*" ] } ] }

For more information on creating a permissions policy, see Creating Customer-Managed Policies.

Create an IAM User for the Plugin

To connect the plugin to your AWS account, you need to create an AWS Identity and Access Management (IAM) user, then attach the permissions policy to that user. If you deployed WordPress on Amazon EC2, you can skip this step and use the IAM role instead of an individual IAM user. For more information, see: IAM Roles for Amazon EC2 in the Amazon EC2 User Guide.

To create an IAM user

  1. Open the IAM console at https://console.aws.amazon.com/iam/ and choose Users.

  2. Choose Add User.

  3. For User Name, type WordPress.

  4. For Access Type, choose Programmatic access, then choose Next: Permissions.

  5. Choose Attach existing policies direction. Choose your newly created policy (PollyForWordPressPolicy) from the list, then choose Next: Review.

  6. Choose Create User.

  7. Copy the Access key ID and Secret access key. You need them to configure the plugin.

    Important

    Make sure that you record these keys because this is the only time you will be able to access them.

Installing and Configuring the Plugin

Note

Instructions for tasks performed in WordPress might not match the WordPress user interface exactly.

To install and configure the plugin

  1. In the WordPress search box, search for Amazon Polly and download the Amazon Polly plugin for WordPress. You can also download it from the Amazon Polly plugin GitHub site.

  2. On the WordPress Admin page, choose Add New Plugin, then install and activate the plugin.

  3. On the WordPress Admin page, choose Settings, then for Amazon Polly Settings, configure the plugin:

    General

    • AWS access key and AWS secret key—AWS credentials, which allow the plugin to use Amazon Polly and Amazon Simple Storage Service (Amazon S3). If you are hosting your WordPress site on Amazon Elastic Compute Cloud (Amazon EC2), you can use AWS Identity and Access Management (IAM) roles instead of credentials. In that case, leave these two fields blank.

    • AWS Region—The AWS region in which you're using Amazon Polly to convert the content into audio. In most cases you should choose the region which is closest to your readers.

    Player settings

    • Player position—The position of the audio player on your WordPress page. You can put it before or after the post, or not use it at all. If you want to make your files available using Amazon Pollycast, choose to not display the audio player.

    • Player label—Specifies optional text that will be shown above the audio player. HTML tags are supported with this label.

    • New post default—Specifies whether Amazon Polly is automatically enabled for all new posts. Choose this option if you want Amazon Polly to use the configuration settings to create an audio file for each new post.

    • Autoplay—Specifies whether the audio player automatically starts playing the audio when a user visits an individual post on the website.

    Amazon Polly settings

    • Sample rate—The sample rate of the audio files that will be generated, in Hz. Higher sampling rates mean higher quality audio.

    • Voice name—The Amazon Polly voice to use to create the audio file. For a complete list of voices and languages used by Amazon Polly, see Voices in Amazon Polly.

    • Automated breaths—If enabled, Amazon Polly will automatically add breathing noises to your audio file at appropriate spots. For more information on this, see Breathing Sounds .

    • Enable SSML support— Enables SSML support for the Amazon Polly WordPress plugin. This is only available if the Store audio in Amazon S3 option is enabled.

    • Lexicons—The names of lexicons used for audio generation. These lexicons must already be uploaded to your AWS account to be used.

    • Audio speed [%]—Specifies the playback speed for the audio files The default value is 100%. Minimum is 20%, Maximum is 200%.

    Cloud storage

    • Store audio in Amazon S3—If you want to store audio files using the Amazon S3 service instead of on the WordPress server, choose this option. For more information and pricing, see Amazon S3

    • Amazon CloudFront (CDN) domain name—If you want to broadcast your audio files with Amazon CloudFront, provide the name of your CloudFront domain, which the plugin will use for streaming audio. You must first create the domain in Amazon CloudFront

    Amazon Pollycast

    • Pollycast enabled—If enabled, the Amazon Polly WordPress plugin will create an XML feed that can then be consumed by ITunes to generate a podcast.

    • ITunes contact email—Specifies the contact email for the podcast with ITunes.

    • ITunes category—The category for your podcast. Choosing a category makes it easier for podcast users to find your podcast in the podcast catalog.

    • ITunes explicit content—Specifies whether to the Amazon Pollycast contains explicit content.

    • ITunes image—Specifies the icon uploaded for the podcast.

    Additional configuration

    • Bulk update all posts—Specifies whether you want to bulk update all posts to use new plugin settings. The bulk update functionality doesn't use the translate functionality of the plugin.

    • Add post title to audio—If selected, each audio file will start the audio from the post title.

    • Add post excerpt to audio—If enabled, each audio file will have an excerpt from the post at the beginning of the audio.

    • Post types—Specifies which type of WordPress page will be converted to audio files.

  4. Under Amazon Translate configuration, configure the settings:

    • Enable translation support—Specifies whether the content translation functionality will be enabled.

    • Show transcript—If enabled, reader will be able to see the translated transcript of the post in other languages.

    • Source language—Specifies the original source language in which the content was written.

    • Source language label—Defines a label for the original source language.

    • Translations label—Specifies the label which will be shown next to available languages.

    • Target languages—Defines a list of the available languages into which the WordPress content can be translated (and for which the audio will also be generated).

  5. Choose Save Changes