Amazon Polly TTS Engine for Windows
Use Amazon Polly voices in native Windows TTS applications
Installation QuickStart
Step 1: Install the AWS Client (if it's not already installed on your machine)
Follow the instructions on this page to install the AWS Command Line Interface on Microsoft Windows.
IMPORTANT: If you're not sure what to do here, follow the instructions in the
MSI Installer
section.
Step 2: Setup your AWS user account
-
Login to your AWS account
-
After you've logged in, click
Services
from the top menu bar, then typeiam
in the search box. ClickIAM
when it pops up. -
On the left, click
Users
-
Click
Add User
-
Type in
polly-windows-user
(you can use any name) -
Click the
Programmatic access
checkbox and leaveAWS Management Console access
unchecked -
Click
Next: Permissions
-
Click
Attach existing policies directly
-
At the bottom of the page, in the search box next to
Filter: Policy type
, typepolly
-
Click the checkbox next to
AmazonPollyFullAccess
-
Click
Next: Review
-
Click
Create user
IMPORTANT: Don't close the web page. You'll need both the
Access key ID
and theSecret access key
in the next step.
Step 3: Configure the AWS Client
Amazon Polly TTS Engine for Windows requires an AWS profile called
polly-windows
. It's in the roadmap to allow custom profiles.
-
Open a Windows command prompt.
-
Type this command:
aws configure --profile polly-windows
-
For
AWS Access Key ID
andAWS Secret Access Key
, use the values from the previous step. -
For
Default region name
, you can hitEnter
for the default (us-east-1
) or enter a different region. Make sure to use all lower-case. This is case-sensitive. -
For
Default output format
, just hitEnter
-
Verify this worked by running this command. You should see a list of voices:
aws --profile polly-windows polly describe-voices
Step 4: Install Amazon Polly TTS Engine for Windows
Download and run the installer: 32-bit or 64-bit
Verify that the installer worked by opening Control Panel
and go to Change text to speech settings
. In the Voice selection
drop-down, you should see all of the Amazon Polly voices. Picking a voice will automatically play a sample.
Adobe Captivate Support
Even though there is a drop-down voice selection in the Audio / Speech Management
window, apparently Adobe Captivate only uses the default voice you choose in Windows Control Panel. The voice selection in Captivate is completely ignored.
To get around this, you can manually specify the voice name that you want to use by using the voice
tag.
Instructions for Manually Specifying a Voice in Adobe Captivate
- Set the default Windows voice in Control Panel to any of the Amazon Polly voices.
- Start Adobe Captivate and open any of your previous documents.
- Choose
Speech Management
from theAudio
menu - (See the screenshot below): Where you enter the text to speak, put the highlighted yellow tags around the text, replacing the name with the voice name you want to use. For example,
<speak><voice name="Matthew">Hi, this is Matthew</voice></speak>
will automatically speak the phrase Hi, this is Matthew in the Matthew voice and<speak><voice name="Ivy">Hi, this is Ivy</voice></speak>
will say Hi, this is Ivy in the Ivy voice.
Click here for the complete list of Polly voice names.
IMPORTANT: It doesn’t matter which voice you select at the top or the left side menu, as long as it’s a Polly voice. The tag will override those selections. However, if you choose a non-Polly voice as the Windows default voice, then the tag will NOT work with the Polly voices.
Also, you can only use one <speak>
tag per block of text, and you can only use one <voice>
tag per <speak>
tag (e.g., you can’t do <speak><voice name="ivy">I’m Ivy.</voice><voice name="Matthew">I’m Matthew</voice></speak>
).
Setting Up Your Development Environment
Overview
There are four components to the SAPI plugin:
TTSEngine
This is the main source code for the actual driver itself.
InstallVoices
Command-line tool that registers the voices.
Polly Player
Simple tool to test out the voices
Installer
Installation tool that installs TTSEngine, InstallVoices and Polly Player
Setting up TTSEngine/InstallVoices
-
Install Visual Studio 2019 with C++ desktop support
-
Clone this repo:
> git clone https://github.com/awslabs/amazon-polly-tts-for-windows
-
Install [vcpkg](vcpkg: a C++ package manager for Windows, Linux, and macOS | Microsoft Docs):
NOTE: This step may take up to an hour to complete.
> cd amazon-polly-tts-for-windows > .\install-vcpkg.bat
-
Start Visual Studio.
-
Click File/Open Folder and select the
amazon-polly-tts-for-windows
folder.
Setting up Polly Player
-
Install Visual Studio 2019 with C# support
-
Start Visual Studio.
-
Open
PollyPlayer\PollyPlayer.csproj
Setting up the Installer
- NOTE: x86 and x64 builds have separate installer files.
-
Install innosetup
-
Start Innosetup.
-
Open
PollyTTSInstaller-x64.iss
orPollyTTSInstaller-x86.iss