Skip to content

Files

Latest commit

 

History

History

word-filtering-script-generator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Word Filtering Script Generator

This workflow generates scripts that erase certain words from video or audio.
When you type the word you want to filter when you create the stack, the video recognizes the word and marks it as *** in the script.
This feature is useful when you want to erase swear words or slang when creating movie subtitles, or when you want to hide certain words.

Learn more about this workflow at Step Functions workflows collection: https://serverlessland.com/workflows/script-generator

Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the AWS Pricing page for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.

Architecture

yoonseo

Deployment Instructions

  1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository:

    git clone https://github.com/aws-samples/step-functions-workflows-collection
    
  2. Change directory to the pattern directory:

    cd step-functions-workflows-collection/word-filtering-script-generator
    
  3. From the command line, use AWS SAM to deploy the AWS resources for the workflow as specified in the template.yaml file:

    sam deploy --guided
    
  4. During the prompts:

    • Enter a stack name
    • Enter the desired AWS Region
    • Allow SAM CLI to create IAM roles with the required permissions.
    • Enter a word you want to erase in the script (Default value: 'amazon')
  5. Note the outputs from the SAM deployment process. These contain the resource names and/or ARNs which are used for testing.

How it works

When you type the word you want to filter when you create the stack, the video recognizes the word and marks it as '***' in the script. You can play the demo, use the sample-video.mp4 file in resource folder.

  1. Deploy stack
  2. Upload sample video file to S3 bucket (bucket-filtering-media).
  3. Then, stateMachine is auto-deployed in Step Functions Console.
  4. When StateMachine is end, you can see filtering-script.txt file in S3 bucket (bucket-filtering-results).

Image

Provide an exported .png of the workflow in the /resources directory from Workflow stuio and add here. image

Testing

When you type the word you want to filter when you create the stack, the video recognizes the word and marks it as '***' in the script. You can play the demo, use the sample-video.mp4 file in resource folder.

  1. Deploy stack
  2. Upload sample video file to S3 bucket (bucket-filtering-media).
  3. Then, stateMachine is auto-deployed in Step Functions Console.
  4. When StateMachine is end, you can see filtering-script.txt file in S3 bucket (bucket-filtering-results).

Cleanup

  1. First, You should delete objects in two S3 bucket. (bucket-filtering-media / bucket-filtering-results).
  2. Delete the stack
    aws cloudformation delete-stack --stack-name STACK_NAME
  3. Confirm the stack has been deleted
    aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Requirements


Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: MIT-0