Script for converting speech to subtitle.
- Adobe After Effects
Create and launch a Docker container.
# Create and launch a Docker container
$ docker-compose up -d --build
# Run the container bash
$ docker-compose exec app bash
Create an AWS IAM user and two S3 buckets for file input and file output. Then, Set config and env files.
$ cp .aws/config.dev .aws/config
$ cp .env.dev .env
Create AWS lambda function for transcribing when wav file has uploaded to S3 input bucket.
- Set transcribe_function/lambda_function.py to AWS lambda function
- Specify an S3 input bucket for the lambda trigger
- Set the following two lambda environment variables
- OUTPUT_BUCKET: AWS S3 output bucket
- REGION: AWS S3 region
- Attach the following policy to lambda function
- AmazonS3FullAccess
- AmazonTranscribeFullAccess
- CloudWatchLogsFullAccess
Place the mp4 files you want to convert in the input directory. The following command will output a wav file under the audio directory.
$ poetry run python converter.py test.mp4 test.wav
Create S3 bucket. Then upload the wav file to the Amazon S3 bucket.
$ poetry run python uploader.py test.wav
You can check code format.
# Lint
$ make lint
# Format
$ make format