{"id":29943116,"url":"https://github.com/carrickcancloud/aws-polly","last_synced_at":"2025-09-11T08:33:49.724Z","repository":{"id":301046268,"uuid":"1007997421","full_name":"carrickcancloud/AWS-Polly","owner":"carrickcancloud","description":"Little project to synthesize text files into mp3 files using Python, Boto3, AWS Polly, AWS S3, with GitHub Actions.","archived":false,"fork":false,"pushed_at":"2025-06-26T11:52:11.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T02:23:47.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carrickcancloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T21:34:43.000Z","updated_at":"2025-06-26T12:21:02.000Z","dependencies_parsed_at":"2025-06-24T22:36:04.664Z","dependency_job_id":"1efd1995-8931-4fc2-a5fa-4a409881b3d2","html_url":"https://github.com/carrickcancloud/AWS-Polly","commit_stats":null,"previous_names":["carrickcancloud/aws-polly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carrickcancloud/AWS-Polly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carrickcancloud%2FAWS-Polly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carrickcancloud%2FAWS-Polly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carrickcancloud%2FAWS-Polly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carrickcancloud%2FAWS-Polly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carrickcancloud","download_url":"https://codeload.github.com/carrickcancloud/AWS-Polly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carrickcancloud%2FAWS-Polly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274602177,"owners_count":25315199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T02:14:06.544Z","updated_at":"2025-09-11T08:33:49.703Z","avatar_url":"https://github.com/carrickcancloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Speech Synthesis Workflow 🎤\n\nThis repository contains a GitHub Actions workflow for synthesizing speech from text using Amazon Polly and uploading the resulting audio files to an S3 bucket. ☁️\n\n## Table of Contents 📚\n1. [Setup AWS Credentials and S3 Bucket](#setup-aws-credentials-and-s3-bucket)\n2. [Create an IAM User with Programmatic Access](#create-an-iam-user-with-programmatic-access)\n3. [Attach IAM Policies](#attach-iam-policies)\n4. [Create Access Keys](#create-access-keys)\n5. [Configure GitHub Secrets](#configure-github-secrets)\n6. [Trigger the Workflows](#trigger-the-workflows)\n7. [Verify the Uploaded .mp3 Files](#verify-the-uploaded-mp3-files)\n\n## Setup AWS Credentials and S3 Bucket 🛠️\n\nTo set up AWS credentials and an S3 bucket, follow these steps:\n\n1. **AWS Account**: Ensure you have an AWS account. If not, create one at [AWS](https://aws.amazon.com/). 🌐\n\n2. **Create an S3 Bucket**:\n   - Go to the S3 service in the AWS Management Console.\n   - Click on \"Create bucket\".\n   - Choose a unique name for your bucket and select a region.\n   - Configure any additional settings as needed and create the bucket. 🪣\n\n## Create an IAM User with Programmatic Access 👤\n\nTo create an IAM user with programmatic access:\n\n1. Sign in to the [AWS Management Console](https://aws.amazon.com/console/).\n2. Navigate to the IAM service.\n3. Click on \"Users\" in the sidebar, then click on \"Create user\".\n4. Enter a username for the new user and click on \"Next\" to proceed to the **Set permissions** section.\n5. Click on \"Next\" to proceed to the \"Review and create\" section.\n6. Click \"Create user\" to proceed. ✅\n\n## Create \u0026 Attach IAM Policies 🔑\n\nAfter creating the IAM user, you need to attach the necessary policies:\n\n1. **Create the `AcmeLabsAmazonPollyReadOnly` Policy**:\n   - In the IAM console, go to \"Policies\" and click \"Create policy\".\n   - Switch to the \"JSON\" tab and paste the following policy:\n     ```json\n     {\n         \"Version\": \"2012-10-17\",\n         \"Statement\": [\n             {\n                 \"Sid\": \"AcmeLabsAmazonPollyReadOnly\",\n                 \"Effect\": \"Allow\",\n                 \"Action\": [\n                     \"polly:SynthesizeSpeech\",\n                     \"polly:DescribeVoices\"\n                 ],\n                 \"Resource\": \"*\"\n             }\n         ]\n     }\n     ```\n   - Click \"Next\", give it a name (`AcmeLabsAmazonPollyReadOnly`), and click \"Create policy\". 📝\n\n2. **Create the `AcmeLabsAmazonS3ReadWrite` Policy**:\n   - Repeat the steps to create another policy and paste the following JSON:\n     ```json\n     {\n         \"Version\": \"2012-10-17\",\n         \"Statement\": [\n             {\n                 \"Sid\": \"AcmeLabsAmazonS3ReadWrite\",\n                 \"Effect\": \"Allow\",\n                 \"Action\": [\n                     \"s3:PutObject\",\n                     \"s3:GetObject\",\n                     \"s3:ListBucket\"\n                 ],\n                 \"Resource\": [\n                     \"arn:aws:s3:::acmelabs-aws-polly-synthesize\",\n                     \"arn:aws:s3:::acmelabs-aws-polly-synthesize/*\"\n                 ]\n             }\n         ]\n     }\n     ```\n   - Name this policy `AcmeLabsAmazonS3ReadWrite` and create it. 🛡️\n\n3. **Attach Policies to the User**:\n   - Click on \"Users\" in the sidebar, then click on your new user's name.\n   - Click on the \"Permissions\" tab.\n   - Click on \"Add permissions\", choose \"Attach existing policies directly\", and select both `AcmeLabsAmazonPollyReadOnly` and `AcmeLabsAmazonS3ReadWrite`.\n   - Click \"Next\" and then \"Add permissions\". ➕\n\n## Create Access Keys 🔑\n\n1. Navigate to the \"Security credentials\" tab of your user.\n2. Click on \"Create access key\" tab.\n3. Click on \"Other\" for the \"Use case\".\n4. Click on \"Next\" and fill out the \"Description tag value\" (name the secret).\n5. Click on \"Create access key\".\n6. Make sure to copy the Access Key ID and Secret Access Key.\n   - You will need these for your GitHub Actions workflow.\n   - **Store** these credentials **securely**, as you will not be able to **view** the Secret Access Key again. 🔒\n   - You can also download the credentials as a CSV file for safekeeping.\n7. Click \"Done\" to finish. 🎉\n\n## Configure GitHub Secrets 🔐\n\n1. Go to your GitHub repository.\n2. Navigate to `Settings` \u003e `Secrets and variables` \u003e `Actions`.\n3. Add the following secrets:\n   1. Click on the \"Secrets\" tab.\n   2. Click on \"New repository secret\".\n   3. Name the secrets as follows:\n      - `ACMELABS_SYNTHESIZE_AWS_ACCESS_KEY_ID`\n      - `ACMELABS_SYNTHESIZE_AWS_SECRET_ACCESS_KEY`\n      - `ACMELABS_SYNTHESIZE_AWS_S3_BUCKET`\n   4. Enter the corresponding values for each secret.\n      - For example:\n        - `ACMELABS_SYNTHESIZE_AWS_ACCESS_KEY_ID`: `AKIAIOSFODNN7EXAMPLE`\n        - `ACMELABS_SYNTHESIZE_AWS_SECRET_ACCESS_KEY`: `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`\n        - `ACMELABS_SYNTHESIZE_AWS_S3_BUCKET`: `acmelabs-aws-polly-synthesize`\n   5. Click \"Add secret\" to save each one. 💾\n\n4. Add the following environment variables:\n   1. Click on the \"Variables\" tab.\n   2. Click on \"New repository variable\".\n   3. Name the variables as follows:\n      - `ACMELABS_SYNTHESIZE_AWS_REGION`\n      - `ACMELABS_SYNTHESIZE_AWS_S3_KEY_PROD`\n      - `ACMELABS_SYNTHESIZE_AWS_S3_KEY_BETA`\n      - `ACMELABS_SYNTHESIZE_AWS_S3_PREFIX`\n   4. Enter the corresponding values for each variable.\n      - For example:\n        - `ACMELABS_SYNTHESIZE_AWS_REGION`: `us-east-1`\n        - `ACMELABS_SYNTHESIZE_AWS_S3_KEY_PROD`: `prod.mp3`\n        - `ACMELABS_SYNTHESIZE_AWS_S3_KEY_BETA`: `beta.mp3`\n        - `ACMELABS_SYNTHESIZE_AWS_S3_PREFIX`: `polly-audio`\n   5. Click \"Add variable\" to save each one. 🌍\n\n## Trigger the Workflows 🚀\n\nThe workflows are triggered automatically based on changes to the `speech.txt` file:\n\n1. Create a new branch.\n2. Make changes to the `speech.txt` file.\n   - Open the `speech.txt` file located in the repository.\n   - Edit the content of the file as needed. For example:\n     ```\n     Where’s the kaboom? There was supposed to be an earth-shattering kaboom!\n     ```\n   - Save your changes.\n3. Commit and push your changes and create a pull request into the `main` branch to trigger the workflow.\n   - Review GitHub Actions to ensure the workflow runs successfully.\n     1. Click on \"Actions\" tab in your GitHub repository.\n     2. In the left sidebar, select the workflow named `On Pull Request`.\n     3. Click on the latest run to view the details.\n     4. Check the logs to ensure that the speech synthesis and S3 upload steps completed successfully. 📊\n4. Merge the pull request into the `main` branch to trigger the workflow.\n   - Review GitHub Actions to ensure the workflow runs successfully.\n     1. Click on \"Actions\" tab in your GitHub repository.\n     2. In the left sidebar, select the workflow named `On Merge`.\n     3. Click on the latest run to view the details.\n     4. Check the logs to ensure that the speech synthesis and S3 upload steps completed successfully. 👍\n\n## Verify the Uploaded .mp3 Files 🎶\n\nTo verify that the .mp3 files have been uploaded to your S3 bucket:\n\n1. Go to the S3 service in the AWS Management Console.\n2. Navigate to your bucket, click on \"Objects\" to view the contents.\n3. Check for the uploaded .mp3 files under the specified prefix (e.g., `polly-audio`).\n4. You can open or download the files to verify their content. 📥\n\n## Conclusion 🏁\n\nThis workflow automates the process of synthesizing text to speech and uploading the audio files to S3. Ensure that your AWS credentials are kept secure and not shared publicly. 🔒\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarrickcancloud%2Faws-polly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarrickcancloud%2Faws-polly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarrickcancloud%2Faws-polly/lists"}