The audio transcription module is available for every endpoint.

For each endpoint, there is an additional module for audio transcription. This is supported by the Summary, Creative, and Livestream API. This flag is to be added to the standard API requests. Please see other documentation for complete API setup and requirements. Additional costs applied if enabled.

Code Sample

curl -X POST 'https://vod2.netra-video.com/v73/summary' -H "Content-Type: application/json" -H "Authorization: Bearer ibcoXzqOVfsB7dcOUk7VIy375X0e4WrN" -d '{"title" : "test ", "description" : "test description", "callback_urls" : ["http://api.webhookinbox.com/i/VXSx2Z2t/in/"], "source_url" : " https://vid.test.com/870a128b-0f94-47dc-9fb7-eecdd6a85e2c/1080_h264.mp4", "include_transcription}'

Upon making a successful request, you should receive an acknowledgment callback in the following format:

{
    "code": 202,
    "body": {
        "request_id": "c160eb8a-1094-49d5-b1e7-0e9d4024de91"
    }
}

Note: In the event of an error, the callback would include an error message with the appropriate HTTP error code (e.g., 4xx or 5xx) . A 2xx message indicates that the request was accepted successfully.

Callback JSON

The Netra callback JSON structure is below. What is of specific interest is the transcript field. This will share the location of the asset to be requested to receive the text for the video requested.

{
	"request_id": "c160eb8a-1094-49d5-b1e7-0e9d4024de91",
	"extra_data": null,
	"video_type": "video",
	"callback_urls": ["http://api.webhookinbox.com/i/0pkEHzAU/in/"],
	"source_url": "https://output-jsons.s3.us-west-1.amazonaws.com/yt_videos/THE+GODFATHER+_+50th+Anniversary+Trailer+_+Paramount+Pictures-UaVTIH8mujA.mp4",
	"title": "transcription test",
	"description": "test description",
	"tags": "",
	"duration": "0:02:00",
	"content_type": "video",
	"summary": {
		"iab-categories": {
			"Movies": {
				"World Movies": 30,
				"Crime & Mystery Movies": 20,
				"Documentary Movies": 8
			},
			"Events & Attractions": {
				"Anniversary": 6
			},
			"Music & Audio": {
				"Soundtracks, TV & Showtunes": 5
			}
		},
	"transcript": "https://vod2.netra-video.com/v73/retrieval/transcripts?request_id=c160eb8a-1094-49d5-b1e7-0e9d4024de91"
}

Transcript Retrieval Request

Using a GET request, including the endpoint, token, and specific request_id, you can retrieve the text for any audio present in the video.

curl -X GET -H "Authorization: Bearer 2ea98a3d733a78f0a5deb57acb44a8e0" https://vod2.netra-video.com/v73/retrieval/transcripts?request_id=c160eb8a-1094-49d5-b1e7-0e9d4024de91

Error Response

HTTP/1.1 500 Internal Server Error
Date: Tue, 18 Apr 2022 17:19:44 GMT
Content-Type: application/json
Content-Length: 35
Connection: keep-alive
Apigw-Requestid: DlWfjgcSliAEP1Q=

{"message":"Internal Server Error"}

Successful Response Prior to Transcript Availability

HTTP/1.1 204 No Content
Date: Wed, 19 Apr 2023 14:03:03 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Connection: keep-alive
Apigw-Requestid: DoMnfjCcliAEPbw=

Successful Response Post Transcript Availability

{"request_id": "c160eb8a-1094-49d5-b1e7-0e9d4024de91", "transcript": "text for the transcript will be visible here."language_code": "en-US"}

Supported Languages

  • 'af-ZA': Afrikaans (South Africa)
  • 'ar-AE': Arabic (United Arab Emirates)
  • 'ar-SA': Arabic (Saudi Arabia)
  • 'da-DK': Danish (Denmark)
  • 'de-CH': German (Switzerland)
  • 'de-DE': German (Germany)
  • 'en-AB': English (Abkhazia)
  • 'en-AU': English (Australia)
  • 'en-GB': English (United Kingdom)
  • 'en-IE': English (Ireland)
  • 'en-IN': English (India)
  • 'en-US': English (United States)
  • 'en-WL': English (Wales)
  • 'es-ES': Spanish (Spain)
  • 'es-US': Spanish (United States)
  • 'fa-IR': Persian (Iran)
  • 'fr-CA': French (Canada)
  • 'fr-FR': French (France)
  • 'he-IL': Hebrew (Israel)
  • 'hi-IN': Hindi (India)
  • 'id-ID': Indonesian (Indonesia)
  • 'it-IT': Italian (Italy)
  • 'ja-JP': Japanese (Japan)
  • 'ko-KR': Korean (South Korea)
  • 'ms-MY': Malay (Malaysia)
  • 'nl-NL': Dutch (Netherlands)
  • 'pt-BR': Portuguese (Brazil)
  • 'pt-PT': Portuguese (Portugal)
  • 'ru-RU': Russian (Russia)
  • 'ta-IN': Tamil (India)
  • 'te-IN': Telugu (India)
  • 'tr-TR': Turkish (Turkey)
  • 'zh-CN': Chinese (China)
  • 'zh-TW': Chinese (Taiwan)
  • 'th-TH': Thai (Thailand)
  • 'en-ZA': English (South Africa)
  • 'en-NZ': English (New Zealand)
  • 'vi-VN': Vietnamese (Vietnam)
  • 'sv-SE': Swedish (Sweden)