Generate track subtitle

This endpoint allows you to generate subtitles for an existing audio track in a media file. By calling this API, you can generate subtitles automatically using speech recognition #### How it works 1. Send a `POST` request to this endpoint, replacing `{mediaId}` with the media ID and `{trackId}` with the track ID. 2. Provide the necessary details in the request body, including the languageName and languageCode. 3. You receive a response containing a unique subtitle track ID and its details. #### Webhook Events 1. After the subtitle track is generated and ready, you receive the webhook event <a href="https://fastpix.com/docs/webhooks/transform-media-events#videomediasubtitlegenerated">video.media.subtitle.generated</a>. 2. Finally the <a href="https://fastpix.com/docs/webhooks/media-events#videomediaupdated">video.media.updated</a> event notifies your system about the media’s updated status. </br> Related guide: <a href="https://fastpix.com/docs/video-on-demand/generate-subtitles-automatically">Add auto-generated subtitles</a>

Authentication

AuthorizationBasic
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. - <b>Username:</b> Access Token ID - <b>Password:</b> Secret Key Activate your FastPix account to generate your API credentials. <a href="https://fastpix.com/docs/getting-started/activate-your-account" target="_blank">See the guide here</a>

Path parameters

mediaIdstringRequiredformat: "uuid"
The unique identifier assigned to the media when created. The value must be a valid UUID.
trackIdstringRequiredformat: "uuid"

A universally unique identifier (UUID) assigned to the specific track for which subtitles must be generated.

Request

This endpoint expects an object.
languageNamestringRequiredDefaults to English
The full name of the language used to generate the subtitles.
languageCodeenumRequiredDefaults to en-US
Language code for content localization
metadatamap from strings to stringsOptional

You can search for videos with specific key value pairs using metadata, when you tag a video in “key” : “value” pairs. Dynamic metadata allows you to define a key that allows any value pair. You can have maximum of 255 characters and upto 10 entries are allowed.

titlestringOptional<=255 characters
Title of the track.

Response

Media details updated successfully
successboolean
Demonstrates whether the request is successful or not.
dataobject
Represents the response for a successfully generated subtitle track.