I have a word which is often confused with another in the auto-captioning produced by Kaltura. For example, the word “Arup” gets confused with “Arab”, understandably. I would like to automate the process of correcting the word Arab to Arup. It seems to be possible in the KMC to find and replace words in the captions, is it possible to do the same via the API?
A process along the lines of, for a media space video, get the captions, do some alterations, and make another call to the API to update with the altered version.
In general, anything that can be done using Kaltura’s web I/Fs (KMS, KMC, editing app, etc) can be done using the API and in fact, the Kaltura interfaces also invoke the same API actions to get the job done.
I have looked at the captionAsset endpoint and I am confused about how I get the captionAssetId for the .get endpoint. In the .list endpoint I can add a filter on entryIdEqual but for some reason, this returns empty. I tried it with a video ID that I know has captions.
To obtain the caption asset, use captionasset.serve(), to update it, call captionasset.setContent().
If you want to update the transcript as well, use the same actions but of the attachmentasset service.
There’s no need to set/pass a KalturaAttachmentServeOptions object.
When I run the below code, I get two valid URLs that return the text in the transcript:
filter = KalturaAssetFilter()
filter.entryIdEqual = "1_3bux4j0v"
pager = KalturaFilterPager()
result = client.caption.captionAsset.list(filter, pager)
for id in result.objects.associatedTranscriptIds.split(","):
r = client.attachment.attachmentAsset.serve(id)
If you’re not, please send me a private message with the URLs you get back and we can debug further.