---
agentTools:
  projectIndex: https://docs.voicebase.com/llms.txt
---

# Retrieve transcript

Retrieve the transcript from a given media

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v3/media/{mediaId}/transcript": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Retrieve transcript",
        "description": "Retrieve the transcript from a given media",
        "operationId": "getTranscript",
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "description": "Get media by Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeAlternateFormat",
            "in": "query",
            "description": "Set of alternate formats to include in the response",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "enum": [
                "text",
                "srt",
                "dfxp",
                "webvtt"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SuccessfulOperation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VbTranscript"
                }
              }
            }
          },
          "401": {
            "description": "UnauthorizedException"
          },
          "403": {
            "description": "ForbiddenException"
          },
          "404": {
            "description": "NotFoundException",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VbErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "VoiceBase V3 API",
    "version": "3.0.31",
    "description": "APIs for speech recognition and speech analytics, powering insights every business needs.",
    "contact": {
      "name": "VoiceBase Support",
      "url": "https://www.voicebase.com/contact-us/",
      "email": "support@voicebase.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "tags": [
    {
      "name": "Media",
      "description": "the Media API"
    }
  ],
  "servers": [
    {
      "url": "https://apis.voicebase.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "VbWordTypeEnum": {
        "type": "string",
        "enum": [
          "punc",
          "turn",
          "dtmf",
          "sub"
        ],
        "description": "Word Type:\n  * punc - Word is punctuation.\n  * turn - Word is a speaker turn.\n  * dtmf - Word is DTMF.\n  * sub  - Word was redacted.\n"
      },
      "VbError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "path": {
            "description": "path to source issue",
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "VbMessage": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "path": {
            "description": "path to source issue",
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "VbErrorResponse": {
        "type": "object",
        "x-voicebase-extension": true,
        "properties": {
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "This is the HTTP Status Code."
          },
          "errors": {
            "description": "Is this Internal Server Errors (5xx)?",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VbError"
            }
          },
          "warnings": {
            "description": "Is this User Data Errors (4xx)?",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VbMessage"
            }
          },
          "reference": {
            "type": "string",
            "description": "A unique reference number identifying the request."
          }
        }
      },
      "VbFrequency": {
        "type": "object",
        "properties": {
          "e": {
            "type": "number",
            "format": "double"
          },
          "f": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "VbWord": {
        "type": "object",
        "properties": {
          "p": {
            "type": "integer",
            "format": "int32",
            "description": "(\"position\") -- The 0-indexed position of the word in the transcript"
          },
          "c": {
            "type": "number",
            "format": "double",
            "description": "(\"confidence\") -- The word confidence score, between 0.0 and 1.0"
          },
          "s": {
            "type": "integer",
            "format": "int64",
            "description": "(\"start time\") -- The word start time, in milliseconds"
          },
          "e": {
            "type": "integer",
            "format": "int64",
            "description": "(\"end time\") -- The word end time, in milliseconds"
          },
          "frq": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VbFrequency"
            }
          },
          "m": {
            "$ref": "#/components/schemas/VbWordTypeEnum"
          },
          "v": {
            "type": "number",
            "format": "double"
          },
          "w": {
            "type": "string",
            "description": "(\"word\") -- The transcribed word"
          }
        }
      },
      "VbTranscript": {
        "type": "object",
        "x-voicebase-extension": true,
        "properties": {
          "confidence": {
            "type": "number",
            "format": "double",
            "description": "The overall The word confidence score of the transcript, between 0.0 and 1.0"
          },
          "words": {
            "type": "array",
            "description": "An array of word elements transcribed from the media, in order.",
            "items": {
              "$ref": "#/components/schemas/VbWord"
            }
          },
          "turns": {
            "type": "array",
            "description": "Accumulated speech from \"conversation\" field. In more user-friendly format",
            "items": {
              "$ref": "#/components/schemas/VbTurn"
            }
          },
          "voiceActivity": {
            "description": "An array of elements organized by speaker indicating where there is voice activity.  Please note that this is an experimental feature and the data format may be changed.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VbVoiceActivity"
            }
          },
          "alternateFormats": {
            "type": "array",
            "description": "The array of alternative formats of this transcript.",
            "items": {
              "$ref": "#/components/schemas/VbTranscriptFormat"
            }
          }
        }
      },
      "VbTranscriptFormat": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "description": "The name of this particular format."
          },
          "contentType": {
            "type": "string",
            "description": "the mime type of the format.  One of application/json, text/plain, text/srt or text/vtt"
          },
          "contentEncoding": {
            "type": "string",
            "description": "The encoding of the format."
          },
          "charset": {
            "type": "string",
            "description": "The charset used in the encoding."
          },
          "data": {
            "type": "string",
            "description": "The formatted transcript."
          }
        }
      },
      "VbVoiceActivity": {
        "type": "object",
        "properties": {
          "speakerName": {
            "description": "The name of this speaker.",
            "type": "string"
          },
          "occurrences": {
            "description": "The voice activity occurrences for this speaker.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VbVoiceActivityOccurrence"
            }
          }
        }
      },
      "VbVoiceActivityOccurrence": {
        "type": "object",
        "properties": {
          "s": {
            "description": "The start of the occurrence in milliseconds from the beginning of the transcript.",
            "type": "integer",
            "format": "int32"
          },
          "e": {
            "description": "The end of the occurrence in milliseconds from the beginning of the transcript.",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "VbTurn": {
        "type": "object",
        "properties": {
          "speaker": {
            "type": "string",
            "description": "The name of the speaker mentioning the keyword or topic.  Unknown is listed if the name of the speaker is unknown."
          },
          "text": {
            "type": "string",
            "description": "Accumulated text from words"
          },
          "s": {
            "type": "integer",
            "format": "int64",
            "title": "Detection Start",
            "description": "Start of the detected text region. This value is in milliseconds."
          },
          "e": {
            "type": "integer",
            "format": "int64",
            "title": "Detection End",
            "description": "End of the detected text region. This value is in milliseconds."
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 96,
      "1": 203,
      "2": 228,
      "3": 227,
      "4": 43,
      "5": 110,
      "6": 67,
      "7": 0,
      "8": 76,
      "9": 213,
      "10": 59,
      "11": 137
    }
  }
}
```