wcrtr / polly-converse

A simple python script that creates an audio conversation from a script using Polly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polly-converse

A simple python script that creates an audio conversation from a script using Amazon Polly.

Create a script

  1. Create a plain text file for your conversation
  2. Use curly braces to designate voices (Voice names are case sensitive)
  3. Use --s--, --m--, --l-- flags in your script to quickly add short, medium, or long pauses.
  4. You can use your own SSML tags in the script for more controls.

Example Script

{Matthew}
Hey there. Hello.
{Joanna}
Hello!
{Matthew}
How's life?
{Joanna}
It's ok!
{Matthew}
Great to hear.
{Joanna}

Running

  1. Install the boto3 python library:

pip install boto3 --user

  1. Enable the Polly service from your AWS console

  2. Set up your AWS credentials

  3. Write your script and run python polly.py your-script.txt

The script outputs an mp3 file with the same name as your script.

Learn more

About

A simple python script that creates an audio conversation from a script using Polly.

License:MIT License


Languages

Language:Python 100.0%