- [Jason] Hi, everyone. I'm Jason O'Malley.
I'm a Partner Solutions Architect here at Amazon Web Services.
I have a background in media and entertainment.
And today in this video snacks episode,
I'm going to walk you through how to
use Amazon Transcribe to create closed caption and
subtitle outputs for video content with no coding
and no advanced AWS machine learning knowledge required.
So, let's jump in!
Now, many people will use the terms closed caption and subtitles interchangeably
to describe the transcribed text at the bottom of
the video player window. Within the Amazon Transcribe service
these files are called subtitle files and that is how we
will refer to them for the remainder of this video.
Now, two of the most common file formats for subtitles are SRT,
which stands for SubRip Text and then the VTT,
which stands for Web Video Text Tracks format.
These text files will typically be uploaded to the video manager
of your destination platform and become selectable within the video player.
Now, if you are new to Amazon Transcribe,
this is an AWS service that makes it easy for customers
to convert speech-to-text using automatic speech recognition (ASR) technology.
Customers can choose to use Amazon Transcribe
for a variety of business applications,
including transcription of voice-based customer service calls,
conduct text-based content analysis on audio and video content and
even the generation of subtitles on audio and video content,
which is what we will focus on here.
Now,
having subtitle creation built right into Amazon Transcribe
is a very helpful feature for video creators because
it offers the ability to accelerate the subtitle
creation workflow that traditionally can be a time-consuming
and manual process. Video content without subtitles risks
creating a negative experience for those that are non-
native speakers and those that are consuming the content
in an environment where sound is not available.
Now,
one primary difference between closed captions and subtitles is
that the closed captions also feature speaker identification,
sound effects and music description.
These are not added automatically as part of this workflow
but they can be manually added during the review and editing phase,
which we will describe at the end of this video.
Now, Amazon Transcribe can help solve many of these problems and
I will walk you through the steps involved to create these video subtitles
now.
The first thing you're going to do is you're going
to log into the Amazon Web Services Console.
Make sure you have your desired region selected. For this demo
we will create an Amazon S3 source bucket for the media file
and a logically separated destination bucket for
the resulting subtitle and transcription outputs.
To do that, we will navigate to the Amazon S3 Console.
You will then select "Create Bucket".
You will need to give your bucket a globally unique name.
We can leave the default settings here.
It is recommended to enable server-side encryption and versioning on your buckets.
And we will repeat the same process for the output S3 bucket.
We'll give that another unique name and copy our previous settings.
It's worth noting that at the time of this recording
the maximum input size for files into Amazon Transcribe is two gigabytes.
If you have a file that exceeds that amount,
I recommend checking out AWS Elemental MediaConvert
which is a media conversion service that
you can use to create an audio only output with a much smaller file size.
Please see that service documentation for more information.
Now, here on my desktop I have our demo video and it
happens to be the Amazon Transcribe service video from our YouTube channel
because transcribing the Amazon Transcribe video was the most meta idea
I could come up with. Here is a quick sample of that video:
- [Announcer] Amazon Transcribe takes a huge leap forward
using deep learning technology to quickly and
accurately convert live or recorded speech into text at a fraction of the cost.
- [Jason] Now as you can see the video is playing locally
on my desktop but I do not have any subtitles.
So, I'm going to need to turn to Amazon Transcribe to create some.
Now, to upload your video that is to be subtitled,
pick that up, select it from your local computer, and drag it into the S3 Console.
I will use the default settings.
The file uploads.
And now you have your file ready in Amazon S3.
From here we will head over to Amazon Transcribe to start the transcription job.
First, navigate to the left rail to select "Transcription jobs".
Then, click on "Create job".
This job name will show up in the job queue and it will
also become the resulting file name when the object is created in S3.
For language settings, my source video is US-based English,
so I will select that. Now custom language models, that you'll see here,
these are great because they can be trained to improve
the transcription accuracy for your specific use case.
So, for example, you can provide Amazon Transcribe with industry-
specific terms or acronyms they might not otherwise recognize.
To create a custom language model,
users can upload a large amount of domain specific text as training data
and then transcription text as tuning data.
We actually have an entire Amazon Transcribe video
snacks episode dedicated to custom language models.
So, I'm not going to dive any deeper for this demo but I
do encourage you to watch that Amazon Transcribe snacks video as well.
We'll skip down to the input data.
Users will have the option to either copy and paste the S3
location or browse for the object. I'll click here to browse S3
and select our file.
Now, under output data,
users will have the option to either use an
Amazon Transcribe-managed bucket and in that case the
output will be removed after 90 days. Or, they
can use a customer-managed S3 bucket.
In this case, the data will be retained for as long
as the customer chooses. Since we created our own bucket,
we will choose this option.
Skipping down to the bottom, this is our big moment.
We see our options for subtitle file formats .SRT and .VTT.
And the great news is selecting SRT or VTT outputs
in your Amazon Transcribe job configuration settings adds no additional cost.
So I will select both.
This section of the configuration will also prompt you to select a starting index
numerical value for the subtitle sequence so that it
will start with either a zero or a one.
It will be important to check with your
destination platforms to see what formats, SRT or VTT,
are accepted and whether an index value of "0" or "1" is preferred.
If your platform does not specify a start index, then it is recommended
to select "1" as it is more common. When you are finished,
click "Next". For the step two of the job creation, you will see audio identification,
alternative results,
automatic content redaction, vocabulary filtering and custom vocabulary.
For subtitle creators in particular,
I recommend you check out custom vocabulary as an option to explore in the future.
The way custom vocabulary works is it allows our users
to improve transcription accuracy for one or more specific words.
Now, this topic is another one which we have an
Amazon Transcribe video snacks so I'm not going to dive
any deeper in this demo but I encourage you to
watch that video snack as well to learn more.
You can click "Create job" and the speech-to-text transcription job will begin.
When the transcript is finished, you will see the indicator turn to green.
We can find the output data location by selecting the blue link.
This will take us to our bucket where we will see the output of the
file with the job name and the post fix of .SRT or .VTT.
With the blue box selected,
the option to download will become available.
Choose a location on your desktop to save the file.
The resulting output is a plain text file and that means that
any text editor can open the file to preview and edit.
I will use my built-in text editor on my desktop.
As you'll see side by side, SRT and VTT
are very similar with just some subtle differences. In both
you will see a series of numbers, timecodes and text.
The numbers indicate the order in which the next subtitle will appear on screen.
The timecode indicates when during playback,
the player will display the text. And the
text is the transcript. Within the text editor,
you can review the transcript and make any
wording changes. When you finish making changes,
you can save your file and, just like that, your subtitles will be updated.
It's that simple. Now that you have your subtitle file on your desktop,
you can preview the file.
I happen to have the open-source VLC player here.
And VLC has a helpful feature that it allows the application
to automatically detect a subtitle file if it's in the
same folder as the source video and shares the same name.
And open in VLC, and what do you know, there is our video with subtitles.
- [Announcer] Amazon Transcribe takes a huge leap forward
using deep learning technology to quickly and
accurately convert live or recorded speech into text at a fraction of the cost.
- [Jason] And after you try this subtitling workflow, if you want to take it to the next level,
then I suggest you check out the Content Localization on AWS solution.
This is an application built upon the AWS Media Insights Engine
developer framework for building applications that process videos,
images, audio, and text with machine learning services on AWS.
The AWS Content Localization solution has an infrastructure as code,
CloudFormation templates
that can be deployed into your AWS account in just a few clicks.
Once deployed,
this solution enables you to not only subtitle your
videos but also translate your videos as well
thanks to the integration with Amazon Translate.
And best of all, the subtitles are able
to be previewed and edited right within your
browser and then downloaded to your computer after.
Just search for "Content Localization on AWS solution"
and look for the deployment guide to get started.
And that is the entire process.
You have now created a subtitle file with Amazon Transcribe
and you can now upload the subtitle file with your
video to the destination platform and all without writing any
code or any advanced AWS machine learning knowledge required.
Good luck in your subtitle creation process and I encourage you to look for other
ways to use the power of Amazon Transcribe to accelerate your day-to-day processes.
I am Jason O'Malley and thanks again
for watching this Amazon Transcribe video snack.
We'll see you on the next one.