How to translate captions / subtitles into other languages
With AVflow, you can easily translate videos into new languages and have those foreign-language subtitles attached or burned into the video.
This article will show you how to do that and use Google Translate as the translation API. Here's how:
[The quickest way is clone this Flow into your workspace!]
- Upload the source video to S3 which is the trigger for this Flow
- Transcribe the video to a transcription file which is the required input to generate video subtitles
- Save result transcription file to S3 so a function step can access and parse it to get the list of strings need to be translated
- Send those strings to Google Translate step to translate
- Rebuild the translated transcription using a new Function step
- Generate target language subtitle using Subtitle step.
1. Add Google Translate to the flow

2. Clone function support parsing the transcription file from the following link
https://avflow.io/script/parsesrctranscription, add it to the flow and setup as in below screenshot:

3. Setup Google Translate step options

- Array inputs: Array of String need to be translated
- Source Language Code: Language code or source strings
- Target Language Code: Language code of target language
4. Clone function to generate the translated transcription from translated strings here: https://avflow.io/script/generateresulttranscription, add it to the flow and setup as in below screenshot:

5. Add Subtitle step to generate subtitles from generated translation

6. Save the .SRT file result to S3 or you can burn in the subtitle to your video
7. Turn the flow on. Check the logs and S3 bucket when the Flow has finished running.