Skip to content

Create audio voiceover from srt subtitle files using AWS Polly

License

Notifications You must be signed in to change notification settings

makemebitter/polly_srt2audio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a script to convert a given *.srt subtitle file to a syncronized voiceover mp3 file. This is done by using AWS Polly for speech generation and then syncronizing according to the subtitle file.

Prerequisite

  • Python
  • An AWS account. It may incurr standard AWS Polly charges
  • AWS command line credentials already configured. Easiest way is to install AWS CLI and run aws configure

Installation

pip install -r requirements.txt

Usage

polly_srt2audio.py [-h] [--input_file INPUT_FILE] [--output_dir OUTPUT_DIR]
                          [--output_file OUTPUT_FILE] [--voice_id VOICE_ID]

Example

mkdir output
python polly_srt2audio.py --input_file /Users/XXX/Downloads/captions.srt --output_dir output

An example voiced-over video can be found here.

About

Create audio voiceover from srt subtitle files using AWS Polly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages