Setting up Amazon Polly
To integrate Amazon Polly's text-to-speech services with Audio flashcards, you will need to follow several key steps, creating an AWS account, obtaining credentials, setting up an IAM user, and generating an access key. This process is best suited for users with advanced technical skills due to its complexity. It's important to note that AWS is a paid service, although it often offers a 12-month free trial period. You are solely responsible for any costs incurred while using this service; you can review the pricing details at Amazon Polly Pricing Details.
You might wonder why you'd bother with all these steps when your device already has built-in text-to-speech capabilities. As of currently, the output quality and overall listenability of speech generated by Amazon Polly surpass that of standard smartphone devices. While this distinction may evolve in the future, currently, leveraging Amazon Polly offers a superior auditory experience for your audio flashcards.
To get access credentials to use Amazon Polly, you will need to follow these steps:
- Create an AWS account if you don't already have one.
- Log in to the AWS Management Console.
- Navigate to the Amazon Polly console.
- Follow the prompts to create an IAM user with the necessary permissions to use Amazon Polly. During this process, you will create an access key and a secret access key for the IAM user.
- Save the access key and secret access key in a secure location, as you will need them to authenticate your API requests when using Amazon Polly. Once you have created an IAM user with the necessary permissions and have obtained an access key and secret access key, you can start using Amazon Polly to synthesize speech. You can use the AWS SDKs, AWS Command Line Interface, or make direct API requests to interact with Amazon Polly.
To create an IAM user with the necessary permissions to use Amazon Polly, you can follow these steps:
- Log in to the AWS Management Console.
- Navigate to the IAM console by using the search box and selecting IAM.
- Select "Users" from the left navigation menu.
- Click on the "Add user" button.
- Enter a name for the new IAM user.
- Create a new User Group with a customized name.
- Search for "AmazonPollyFullAccess" in the Permissions policies search box and select the policy.
- Click the "Create user group" button.
- Select the newly created user group.
- Click the "Next: Review" button.
- Review the settings for the new IAM user and click the "Create user" button.
- Go to the "Security credentials" tab of the newly created user.
- Scroll down and find the "Create access keys" button, and click it.
- Select "Command Line Interface (CLI)" and set a description tag, or skip this step.
- Click the "Create access key" button.
- On the final page, copy or download the new IAM user's access key ID and secret access key. Note that the secret access key will not be shown again.
- Enter the access key and secret access key in the app, separated by a comma (“Access key, Secret access”).
- You're all set to enjoy!