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/vod-events/transform-media-events#videomediasubtitlegeneratedready">video.media.subtitle.generated.ready</a>.
2. Finally the <a href="https://fastpix.com/docs/vod-events/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/manage-audio-and-subtitle-tracks/generate-subtitles-automatically">Add auto-generated subtitles</a>
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.
Response
Media details updated successfully
successboolean
Demonstrates whether the request is successful or not.
dataobject
Represents the response for a successfully generated subtitle track.