Giter Site home page Giter Site logo

bluce-clj / amazon-translate-video-subtitles-captions-translation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-translate-video-subtitles-captions-translation

0.0 0.0 0.0 325 KB

License: MIT No Attribution

Shell 7.97% Python 92.03%

amazon-translate-video-subtitles-captions-translation's Introduction

Translating Captions files (VTT, SRT) using Amazon Translate

About

This project contains source code and supporting files for a serverless pipeline for translating Caption files in VTT and SRT formats using Amazon Translate that you can deploy with the SAM CLI. It includes the following files and folders.

  • translate_captions - Code for the application's Lambda functions.
  • translate-captions-template.yaml - A template that defines the application's AWS resources.

The application uses several AWS resources, including AWS Lambda functions, Amazon EventBridge. These resources are defined in the translate-captions-template.yaml file in this project.

Important: this application uses Amazon Translate and there are costs associated with this service after the Free Tier usage - please see the Amazon Translate pricing page for details.

Reference

Translating Captions files with Amazon Translate

Solution Architecture

Building and Deploying the application

Setup

Download or clone this repository.

$ git clone [email protected]:aws-samples/amazon-translate-video-subtitles-captions-translation.git
$ cd amazon-translate-video-subtitles-captions-translation

To create a new bucket for deployment artifacts, run create-bucket.sh.

$ ./create-bucket.sh
make_bucket: lambda-artifacts-a1b2c3d4e5e6

Deploy

To deploy the application, run deploy.sh.

$ ./deploy.sh
BUILD SUCCESSFUL in 1s
Successfully packaged artifacts and wrote output template to file out.yml.
Waiting for changeset to be created..
Successfully created/updated stack - translate-captions-stack

This script uses AWS CloudFormation to deploy the Lambda functions and an IAM role. If the AWS CloudFormation stack that contains the resources already exists, the script updates it with any changes to the template or function code.

How it works

  • Deploy the stack with required parameters (SourceLanguageCode, TargetLanguageCode and TriggerFileName)
  • Upload caption files (.VTT, .SRT) in the input folder of the created Amazon S3 bucket.
  • Upload the 0-byte file with name matching the TriggerFileName parameter in the input folder
  • The solution will trigger and after few minutes , you will see the translated JSON files in output folder in the same bucket

Cleanup

To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:

aws cloudformation delete-stack --stack-name translate-captions-stack

License

This solution is licensed under the MIT-0 License. See the LICENSE file.

amazon-translate-video-subtitles-captions-translation's People

Contributors

amazon-auto avatar avisaws avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.