Last updated: May 29, 2024

<span aria-hidden="true" id="re-loadit-enhancing-subtitles-with-documentconvert"></span>

# Re-Loadit: enhancing subtitles with /document/convert

![Charlie Macnamara](/assets/images/teammates/charlie.jpg?dpl=dpl_6nhQNS5wkVkPZWuKMzXcWrAHNJL5)

**Charlie Macnamara**

Technical Writer & Support Engineer · Scotland · Show bio

In our Re-loadit series, we give a belated introduction to some of Transloadit's less-covered features by showcasing what they are capable of and giving you some useful tips on how to get them up and running. It has been a couple of months since our last addition to this series, so let's pick up where we left off by shining the spotlight on the[/document/convert](/docs/robots/document-convert.md) Robot!

<span aria-hidden="true" id="the-documentconvert-robot"></span>

## The /document/convert Robot

You can use the [/document/convert](/docs/robots/document-convert.md) Robot to automatically process your documents and convert them into a different format.

![/document/convert Robot](/_next/static/immutable/media/opengraph-image.2kd_0of-zi-er.png)

With so many different file varieties out there, it is inevitable that some file types will not be supported by certain operations or processes. In other cases, a specific file type might simply do the job better than another. This is the case with the conversion process that we will be looking at today: converting SRT files to VTT files. At this current time, VTT is the only file type our[/document/convert](/docs/robots/document-convert.md) Robot can convert to.

SRT files are the most common among the many types of subtitle formats out there, but they lack some of the capabilities of VTT files, such as enabling HTML5 code. With that in mind, you may wish to convert your files to make use of the additional features that the VTT file type offers.

The [/document/convert](/docs/robots/document-convert.md) Robot was introduced to the Transloadit Robot family back in May of 2018.

<span aria-hidden="true" id="creating-the-assembly"></span>

## Creating the Assembly

These are the Assembly Instructions I used:

```python
assembly.add_step("converted", "/document/convert", {"format": "vtt"})

```

In the code above, we have defined the Assembly Instructions to fit into ourTemplate, so that the file used can be uploaded for Transloadit to handle.

To demonstrate these Assembly Instructions, all we have to do is run the Python-createdTemplate below with the implemented Assembly Instructions. Copy these lines of code to follow along:

```python
# pip install pytransloadit
from transloadit import client

tl = client.Transloadit(YOUR_TRANSLOADIT_KEY, YOUR_TRANSLOADIT_SECRET)

assembly = tl.new_assembly()
assembly.add_file(open("subtitle.srt", "rb"))
assembly.add_step("converted", "/document/convert", {"format": "vtt"})

assembly_response = assembly.create(wait=True)

print(assembly_response.data['assembly_id'])

```

After running this code, refer to your [Assemblies](/c/assemblies/), click the top Assembly, and you should see a result like this:

![The Assembly results page](/_next/static/immutable/media/2019-11-16-document-convert-assembly.0brnd8df33jub.png)

<span aria-hidden="true" id="the-results"></span>

## The results

Under the results section, you can either choose to download your new VTT file or open it within the browser. Either way will yield the same result — you'll be able to verify that the new file is indeed a VTT file!

![The contents of the VTT file](/_next/static/immutable/media/2019-11-16-document-convert-vtt.1-dcpkgv69vrf.png)

That brings us to the end of another installment of the Re-loadit series. I hope you're looking forward to the next one!

[#document-processing-service](/blog/tags/document-processing-service.md)[#document-convert-robot](/blog/tags/document-convert-robot.md)[#vtt](/blog/tags/vtt.md)[#re-loadit](/blog/tags/re-loadit.md)

### 👩‍💻 Join 20k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Your email:

Get access

## File uploading and encoding. Made simple.

Transloadit streamlines file handling for developers, trusted by brands like Coursera and The New York Times. We’re known for a reliable API, top-notch support, and a strong commitment to open source, with projects like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io) setting standards in file processing.

[Sign up](/c/)[Book a Demo](https://survey.typeform.com/to/kRg47Xi5)

No credit card needed · 5 GB included in the free plan

Cancel anytime
