This endpoint allows you to generate subtitles for an existing audio track in a media file using its media ID and track ID. You need to provide the language name and language code in the request payload.
How it works
-
Send a POST request to
/on-demand/{mediaId}/track/{trackId}/generate-subtitles
, replacing{mediaId}
with the media ID and{trackId}
with the track ID. -
Provide the necessary details in the request body, including the language name and language code.
-
Receive a response containing a unique subtitle track ID and its details.
Webhook Events
-
Once the subtitle track is generated and ready, you will receive the webhook event video.media.subtitle.generated.
-
Finally, an update event video.media.updated will notify your system about the media's updated status.
Use case:
Suppose you have a video uploaded to the FastPix platform, and you want to generate a subtitle track for an existing audio track associated with the media. By calling this API, you can generate subtitles automatically using speech recognition.