Skip to main content
Version: v1.0

Transcription video

Transcription API converts visual and autio context of the video into text representations. You could transcribe an uploaded vidoe in two ways:

  • AUDIO: Transcribing the video's audio content into text.
  • VIDEO: Transcribing the video's visual content into text.

Host URL

Submit Transcription Task

You can submit a transcription task through this interface with the following options:

  • Choose between AUDIO or VIDEO transcription.
  • Specify a callback address to receive the transcription results automatically.
  • Opt not to use a callback—in this case, you can retrieve the transcription results using the query interface.

POST /api/serve/video/subTranscription

Request Example

import requests
headers = {"Authorization": "Bearer <YOUR_ACCESS_TOKEN>"} # access token
data = {"videoNo": "<VIDEO_NO>","type":"AUDIO/VIDEO","callBackURI":"<CALLBACK>"}
response = requests.post(
"https://mavi-backend.memories.ai/api/serve/video/subTranscription",
headers=headers,
json=data
)
print(response.json())

Replace the placeholders in the code above with your actual values:

  • YOUR_ACCESS_TOKEN: Your access token.
  • VIDEO_NO: The unique video number.
  • AUDIO or VIDEO: The transcription type (choose one).
  • CALLBACK: (Optional) A publicly accessible URL endpoint,

Request Body

{
"videoNo": "string",
"type": "string",
"callBackURI": "string"
}
NameLocationTypeRequiredDescription
AuthorizationheaderstringYesauthorization token
videoNobodystringYesvideo number
typebodystringYestranscription type: AUDIO, VIDEO
callBackURIbodystringNocallback address

Response Example

Status code 200

{
"code": "string",
"msg": "string",
"data": {
"taskNo": "string"
}
}
NameTypeRequiredDescription
codestringtrueresponse code
msgstringtruemessage with response code
dataobjecttrueJSON data
» taskNostringtruetask number

GET Transcription Content

You can get the transcription content of the video through this interface, you need to provide the video number.

GET /api/serve/video/getTranscription

Request Example

import requests
headers = {"Authorization": "Bearer <YOUR_ACCESS_TOKEN>"} # access token
data={"taskNo":"<TASK_NO>"}
response = requests.get(
"https://mavi-backend.memories.ai/api/serve/video/getTranscription",
headers=headers,
params=data
)
print(response.json())

Replace the YOUR_ACCESS_TOKEN in the above code as your access token, TASK_NO as your task number, you can get the transcription content of the video through the task number.

Request Parameters

NameLocationTypeRequiredDescription
AuthorizationheaderstringYesauthorization token
taskNoquerystringYestask number

Response Example

If you provide a callback URL when submitting the task, a mesage containing content inside data in the following example will be sent to callback URL automatically to notify the status of the task.

Status code 200

{
"code": "string",
"msg": "string",
"data": {
"status": "FINISH",
"type": "AUDIO",
"videoNo": "videoNo_fd30e4c3700c",
"taskNo": "taskNo_0a3f11298b9e",
"transcriptions": [
{
"id": 0,
"startTime": 0,
"endTime": 0,
"content": "content_0e5150607a47"
}
]
}
}
NameTypeRequiredDescription
codestringtrueresponse code
msgstringtruemessage with response code
dataobjecttrueJSON data
» taskNostringtruetask number
» statusstringtruetranscription status: FINISH, UNFINISHED
» typestringtruetranscription type
» videoNostringtruevideo number
» transcriptionsarraytruetranscription content
»» idnumbertruetranscription number
»» startTimenumbertruestart time
»» endTimenumbertrueend time
»» contentstringtruetranscription content