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>
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.