# AnnotateVideoResponse

- [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SCHEMA_REPRESENTATION)
- [VideoAnnotationResults](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoAnnotationResults)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoAnnotationResults.SCHEMA_REPRESENTATION)
- [LabelAnnotation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation.SCHEMA_REPRESENTATION)
- [Entity](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity.SCHEMA_REPRESENTATION)
- [LabelSegment](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelSegment)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelSegment.SCHEMA_REPRESENTATION)
- [VideoSegment](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment.SCHEMA_REPRESENTATION)
- [LabelFrame](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelFrame)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelFrame.SCHEMA_REPRESENTATION)
- [ExplicitContentAnnotation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentAnnotation)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentAnnotation.SCHEMA_REPRESENTATION)
- [ExplicitContentFrame](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentFrame)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentFrame.SCHEMA_REPRESENTATION)
- [SpeechTranscription](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechTranscription)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechTranscription.SCHEMA_REPRESENTATION)
- [SpeechRecognitionAlternative](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechRecognitionAlternative)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechRecognitionAlternative.SCHEMA_REPRESENTATION)
- [WordInfo](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#WordInfo)
  - [JSON representation](https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#WordInfo.SCHEMA_REPRESENTATION)

Video annotation response. Included in the `response` field of the `Operation` returned by the `operations.get` call of the `google::longrunning::Operations` service.

| JSON representation ||
|---|---|
| ``` { "annotationResults": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoAnnotationResults`) } ] } ``` |

| Fields ||
|---|---|
| `annotationResults[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoAnnotationResults`)`` Annotation results for all videos specified in `AnnotateVideoRequest`. |

## VideoAnnotationResults

Annotation results for a single video.

| JSON representation ||
|---|---|
| ``` { "inputUri": string, "segmentLabelAnnotations": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`) } ], "shotLabelAnnotations": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`) } ], "frameLabelAnnotations": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`) } ], "shotAnnotations": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment`) } ], "explicitAnnotation": { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentAnnotation`) }, "speechTranscriptions": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechTranscription`) } ], "error": { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/Status`) } } ``` |

| Fields ||
|---|---|
| `inputUri` | `string` Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). |
| `segmentLabelAnnotations[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`)`` Label annotations on video level or user specified segment level. There is exactly one element for each unique label. |
| `shotLabelAnnotations[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`)`` Label annotations on shot level. There is exactly one element for each unique label. |
| `frameLabelAnnotations[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelAnnotation`)`` Label annotations on frame level. There is exactly one element for each unique label. |
| `shotAnnotations[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment`)`` Shot annotations. Each shot is represented as a video segment. |
| `explicitAnnotation` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentAnnotation`)`` Explicit content annotation. |
| `speechTranscriptions[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechTranscription`)`` Speech transcription. |
| `error` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/Status`)`` If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail. |

## LabelAnnotation

Label annotation.

| JSON representation ||
|---|---|
| ``` { "entity": { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity`) }, "categoryEntities": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity`) } ], "segments": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelSegment`) } ], "frames": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelFrame`) } ] } ``` |

| Fields ||
|---|---|
| `entity` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity`)`` Detected entity. |
| `categoryEntities[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#Entity`)`` Common categories for the detected entity. E.g. when the label is `Terrier` the category is likely `dog`. And in some cases there might be more than one categories e.g. `Terrier` could also be a `pet`. |
| `segments[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelSegment`)`` All video segments where a label was detected. |
| `frames[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#LabelFrame`)`` All video frames where a label was detected. |

## Entity

Detected entity from video analysis.

| JSON representation ||
|---|---|
| ``` { "entityId": string, "description": string, "languageCode": string } ``` |

| Fields ||
|---|---|
| `entityId` | `string` Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/). |
| `description` | `string` Textual description, e.g. `Fixed-gear bicycle`. |
| `languageCode` | `string` Language code for `description` in BCP-47 format. |

## LabelSegment

Video segment level annotation results for label detection.

| JSON representation ||
|---|---|
| ``` { "segment": { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment`) }, "confidence": number } ``` |

| Fields ||
|---|---|
| `segment` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#VideoSegment`)`` Video segment where a label was detected. |
| `confidence` | `number` Confidence that the label is accurate. Range: \[0, 1\]. |

## VideoSegment

Video segment.

| JSON representation ||
|---|---|
| ``` { "startTimeOffset": string, "endTimeOffset": string } ``` |

| Fields ||
|---|---|
| `startTimeOffset` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive). A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |
| `endTimeOffset` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive). A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |

## LabelFrame

Video frame level annotation results for label detection.

| JSON representation ||
|---|---|
| ``` { "timeOffset": string, "confidence": number } ``` |

| Fields ||
|---|---|
| `timeOffset` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Time-offset, relative to the beginning of the video, corresponding to the video frame for this location. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |
| `confidence` | `number` Confidence that the label is accurate. Range: \[0, 1\]. |

## ExplicitContentAnnotation

Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.

| JSON representation ||
|---|---|
| ``` { "frames": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentFrame`) } ] } ``` |

| Fields ||
|---|---|
| `frames[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#ExplicitContentFrame`)`` All video frames where explicit content was detected. |

## ExplicitContentFrame

Video frame level annotation results for explicit content.

| JSON representation ||
|---|---|
| ``` { "timeOffset": string, "pornographyLikelihood": enum(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/Likelihood`) } ``` |

| Fields ||
|---|---|
| `timeOffset` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Time-offset, relative to the beginning of the video, corresponding to the video frame for this location. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |
| `pornographyLikelihood` | ``enum(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/Likelihood`)`` Likelihood of the pornography content.. |

## SpeechTranscription

A speech recognition result corresponding to a portion of the audio.

| JSON representation ||
|---|---|
| ``` { "alternatives": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechRecognitionAlternative`) } ] } ``` |

| Fields ||
|---|---|
| `alternatives[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#SpeechRecognitionAlternative`)`` Output only. May contain one or more recognition hypotheses (up to the maximum specified in `maxAlternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer. |

## SpeechRecognitionAlternative

Alternative hypotheses (a.k.a. n-best list).

| JSON representation ||
|---|---|
| ``` { "transcript": string, "confidence": number, "words": [ { object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#WordInfo`) } ] } ``` |

| Fields ||
|---|---|
| `transcript` | `string` Output only. Transcript text representing the words that the user spoke. |
| `confidence` | `number` Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for `is_final=true` results. Clients should not rely on the `confidence` field as it is not guaranteed to be accurate or consistent. The default of 0.0 is a sentinel value indicating `confidence` was not set. |
| `words[]` | ``object(`https://docs.cloud.google.com/video-intelligence/docs/reference/rest/Shared.Types/AnnotateVideoResponse#WordInfo`)`` Output only. A list of word-specific information for each recognized word. |

## WordInfo

Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.

| JSON representation ||
|---|---|
| ``` { "startTime": string, "endTime": string, "word": string } ``` |

| Fields ||
|---|---|
| `startTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Output only. Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |
| `endTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration` format)`` Output only. Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `"3.5s"`. <br /> |
| `word` | `string` Output only. The word corresponding to this set of information. |