Skip to content

dylinstoen/Polly-Speech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 

Repository files navigation

Description

Run Amazon Polly right on your desktop using this amazingly simple app!

image

Play audio right inside the app or save it as an mp3!

image

Switch between light and dark themes!

image

Scale the UI to be larger or smaller!

image

Choose from any of the Amazon Polly natural voices!

image

Tutorial

  1. Set Up Your AWS Account

    • Sign Up: Head over to AWS Home to create your account. You’ll need to provide some basic info like your email, password, contact details, and credit card.
    • Log In: Once you’ve set up your account, log into the AWS Management Console.
  2. Create an IAM User

    • From the AWS Console Home screen (can access this screen by clicking the AWS logo in the top left corner) look to the right of the logo for a search bar
    • In the search bar type "iam" in the search box and then click on the result that just says IAM under the Services category following the picture below

image

  • Once inside the Identiy and Access Management (IAM) homepage look to the left and you should see a sidebar full of options, under the Access management category click on Users like in the picture below

image

  • To the right click on Create user like in the picture below

image

  • Give the user a name and then click Next
  • Under Set permissions and Permission options there's 3 options, toggle on the rightmost option which should say Attach policies directly
  • After the Permission options there's the Permissions policies where under that category, check on AmazonPollyFullAccess (and optionally toggle on AdministratorAccess, AWSCompromisedKeyQuarantineV2 for more control)
  • Click Next and then Create user
  1. Set Up AWS CLI (Optional)
    • Attach Security Credentials:
      • After creating a user, we should be back in the users directory
      • Open into the user we just created in step 2 by clicking on there name
      • Now once your inside, look in the middle of the dashboard to find 4 tab options labeled (Permissions Groups, Tags, Security credentials, Access Advisor), and then click on the tab that says Security credentials tab
      • Inside the Security credentials tab look under the Access Keys (0) tab and then under that tab click Create Access key
      • From the list of types, toggle on the Command Line Interface (CLI) option and then check on the box below that says I understand...
      • (On this page DON'T click on Done!) Instead, to the left of Done there should be a button that says Download .csv file, click on that and save the .csv file to your computer. This stores the access key/secrete pair in a .csv but if you want to store them some other way you can, you just need to know there values for the next step (Read if you forgot your keys: if you forgot your access key values then all you have to do is repeat step 3, once you created a new access key and you SAVED there values then you can go to your list of access keys and delete the old one)
  • Install and Configure AWS ClI:
    • Download and install AWS CLI.exe by following this link to the AWS CLI website then click on whats boxed in red from the picture below matching the system your on.

image

  • Open a command prompt on your desktop
  • Run aws configure in your command prompt.
  • Input your AWS Access Key ID and Secret Access Key (if you forgot look at the username_access.cvs file you saved earlier)
  • Set your default region, like us-east-1, and output format as json.
  1. Run Synthesize Speech App!

    • Grab the exe from the releases section on this GitHub repo.
    • Open it, and if a warning pops up, click more info and then Run anyway.
  2. Add Polly Speech to All Programs in Windows (Optional)

    • Right-click on the exe and choose create desktop shortcut.
    • Move the shortcut to C:\ProgramData\Microsoft\Windows\Start Menu\Programs.
    • Renaming the shortcut will change how it appears in search results without breaking the link.

Troubleshooting

  1. build local version of program

    • install python 3.11.7, then in the terminal run the following pip commands
      • pip install boto3 - pip install pygame - pip install customtkinter - pip install io - pip install pyinstaller
    • Download the synthesize_speech-advanced.py file
    • open up the terminal in the directory of the python file you just downloaded, run the following command - pyinstaller --onefile --windowed text_to_speech.py
    • Inside the same folder as your python file should be a Dist, open it up and there should be your local build of synthesize_speech-advanced.exe
  2. if the synthesize_speech-advanced.exe build failed continue below

    • install visual studio build tools 2022 and the rest of the programs dependcies
      • in the main install menu check on to install Desktop development with C++
      • in individual components check on to install MSVC v142 - VS 2019 C++ x64/x86 build tools
      • open edit the system enviorment variables and then under System open up path
      • under path add
        • C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64
          • C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
          • open up the terminal in the directory of the python file you downloaded in step 1, then run the following command again
          • pyinstaller --onefile --windowed text_to_speech.py
        • Inside the same folder as your python file should be a Dist, open it up and there should be your local build of synthesize_speech-advanced.exe