You can export your completed transcripts in SRT or VTT format, which can be used for subtitles and closed captions in videos. Once your transcript status shows as completed, you can make a request to the appropriate endpoint to export your transcript in SRT or VTT format.
hours:minutes:seconds,milliseconds
and are separated by -->
..
) separating seconds and milliseconds instead of a comma (,
).<track>
element to add subtitles to a <video>
element.upload_url
returned by the AssemblyAI API to create a JSON payload containing the audio_url
parameter.
POST
request to the AssemblyAI API endpoint with the payload and headers.
completed
, you can retrieve the transcript from the API response.
GET
request to the /v2/transcript/:id/:subtitle_format
endpoint. The format is either srt
or vtt
.
chars_per_caption
URL parameter in your API requests to either the SRT or VTT endpoints. For example, adding ?chars_per_caption=32
to the SRT endpoint URL ensures that each caption has no more than 32 characters.
API/Model Reference
.srt
and .vtt
files. These are standard subtitle formats, and can be used with videos both on and off the web. For example, after generating your subtitle file, you can add it to a Mux video using their platform, or you can use ffmpeg to embed it in a local video file. Subtitle formats contain plain text, so you can import these formatted captions to most video editors, or fine-tune them as needed.