Installing and Configuring Amazon Polly for Windows (SAPI)
To install and configure the Amazon Polly for Windows (SAPI) plugin, you need an AWS account. If you don't have an account, see Step 1.1: Sign up for AWS.
Topics
Create an IAM User for the AWS Client
Before connecting the AWS client to your AWS account, you need to create an Identity and Access Management (IAM) user for the client, then attach a permissions policy to that user. An IAM user is a person or application in an AWS account that can make API calls to AWS products.
The AWS client uses the Amazon Polly service, so it needs the
AmazonPollyReadOnlyAccess
permissions policy .
To create an IAM user
-
Sign in to the AWS Management Console and open the IAM console
. -
Choose Users.
-
Choose Add User.
-
For User Name, enter
polly-windows-user
. -
For Access Type, choose Programmatic access, then choose Next: Permissions.
-
Choose Attach existing policies directly
-
In the search box, enter
polly
. -
Choose AmazonPollyReadOnlyAccess.
-
Choose Next: Tags.
-
Choose Next: Review.
-
Choose Create User.
-
Record the access key ID and secret access key. You need them to configure the AWS client.
Important This is the only time you can access these keys, so be sure to record them.
Install the AWS CLI for Windows
The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands from the Windows command prompt. To install the AWS CLI, see Installing the AWS CLI on Windows in the AWS Command Line Interface User's Guide.
Create a Profile for the AWS Client
The Amazon Polly for Windows plugin requires an AWS profile called
polly-windows
. This profile ensures that the Amazon Polly engine use the
correct account.
To create the polly-windows
profile for the AWS client
-
In Windows, open a command prompt.
-
At the command prompt, run the
aws configure --profile polly-windows
command. -
When prompted for the AWS Access Key ID and AWS Secret Access Key, enter the values that you saved when you created the IAM user.
-
For Default region, enter the name of the desired AWS Region in lower-case letters.
Note Not all Amazon Polly voices and features are available in all AWS Regions. For more information, see Feature and Region Compatibility.
-
For Default output format, press Enter.
-
At the command prompt, verify the profile by running the
aws --profile polly-windows polly describe-voices
command. If you have successfully created the profile, the AWS CLI displays a list the available Amazon Polly names.
Install the Amazon Polly for Windows Plugin
Install the Amazon Polly for Windows plugin by downloading it from Amazon Simple Storage Service (Amazon S3) and running the installer. After you install the plugin, you can use Amazon Polly voices in all Windows application that use the SAPI API.
If you are planning to use a neural voice in your SAPI application, ensure that your client is configured for an AWS Region that supports NTTS before installing the for Windows plugin. For more information, see Feature and Region Compatibility.
To install the Amazon Polly for Windows plugin
-
In Windows, download the plugin.
-
Unzip the folder.
-
Run
AmazonPollyForWindowsSetup.exe
. -
In the Control Panel, search for
speech settings
. -
Under Text-to-speech, for Voice, choose an Amazon Polly voice.
-
Choose Preview Voice.