Service Client: Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoIntelligenceServiceClient
Client stub representing the remote VideoIntelligenceService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to videointelligence.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Videointelligence::V1::VideoIntelligence - Compiled Protocol Buffers messages for google/cloud/videointelligence/v1/video_intelligence.proto
SYNOPSIS
use Google::Cloud::Videointelligence::V1::VideoIntelligence;
my $msg = Google::Cloud::Videointelligence::V1::VideoIntelligence::AnnotateVideoRequest->new({
input_uri => $input_uri,
input_content => $input_content,
features => $features,
video_context => $video_context,
});
# Read or update a field
my $val = $msg->input_uri();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Videointelligence::V1::VideoIntelligence::AnnotateVideoRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/videointelligence/v1/video_intelligence.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Videointelligence::V1::VideoIntelligence::AnnotateVideoRequest
Video annotation request.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringInput video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.
$msg->input_content()/$msg->input_content($value)Type:
BytesThe video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.
$msg->features()/$msg->features($value)Type:
Enum(Google::Cloud::Videointelligence::V1::Feature)Required. Requested video annotation features.
$msg->video_context()/$msg->video_context($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoContext)Additional video context and/or feature-specific parameters.
$msg->output_uri()/$msg->output_uri($value)Type:
StringOptional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
$msg->location_id()/$msg->location_id($value)Type:
StringOptional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.
Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoContext
Video context and/or feature-specific parameters.
Inherits from Protobuf::Message.
Accessors
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.
$msg->label_detection_config()/$msg->label_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelDetectionConfig)Config for LABEL_DETECTION.
$msg->shot_change_detection_config()/$msg->shot_change_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ShotChangeDetectionConfig)Config for SHOT_CHANGE_DETECTION.
$msg->explicit_content_detection_config()/$msg->explicit_content_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ExplicitContentDetectionConfig)Config for EXPLICIT_CONTENT_DETECTION.
$msg->face_detection_config()/$msg->face_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceDetectionConfig)Config for FACE_DETECTION.
$msg->speech_transcription_config()/$msg->speech_transcription_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechTranscriptionConfig)Config for SPEECH_TRANSCRIPTION.
$msg->text_detection_config()/$msg->text_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::TextDetectionConfig)Config for TEXT_DETECTION.
$msg->person_detection_config()/$msg->person_detection_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::PersonDetectionConfig)Config for PERSON_DETECTION.
$msg->object_tracking_config()/$msg->object_tracking_config($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingConfig)Config for OBJECT_TRACKING.
Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelDetectionConfig
Config for LABEL_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->label_detection_mode()/$msg->label_detection_mode($value)Type:
Enum(Google::Cloud::Videointelligence::V1::LabelDetectionMode)What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.
$msg->stationary_camera()/$msg->stationary_camera($value)Type:
BoolWhether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
$msg->model()/$msg->model($value)Type:
StringModel to use for label detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
$msg->frame_confidence_threshold()/$msg->frame_confidence_threshold($value)Type:
FloatThe confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.
$msg->video_confidence_threshold()/$msg->video_confidence_threshold($value)Type:
FloatThe confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.
Google::Cloud::Videointelligence::V1::VideoIntelligence::ShotChangeDetectionConfig
Config for SHOT_CHANGE_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for shot change detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingConfig
Config for OBJECT_TRACKING.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for object tracking. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceDetectionConfig
Config for FACE_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for face detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
$msg->include_bounding_boxes()/$msg->include_bounding_boxes($value)Type:
BoolWhether bounding boxes are included in the face annotation output.
$msg->include_attributes()/$msg->include_attributes($value)Type:
BoolWhether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.
Google::Cloud::Videointelligence::V1::VideoIntelligence::PersonDetectionConfig
Config for PERSON_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->include_bounding_boxes()/$msg->include_bounding_boxes($value)Type:
BoolWhether bounding boxes are included in the person detection annotation output.
$msg->include_pose_landmarks()/$msg->include_pose_landmarks($value)Type:
BoolWhether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.
$msg->include_attributes()/$msg->include_attributes($value)Type:
BoolWhether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.
Google::Cloud::Videointelligence::V1::VideoIntelligence::ExplicitContentDetectionConfig
Config for EXPLICIT_CONTENT_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->model()/$msg->model($value)Type:
StringModel to use for explicit content detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1::VideoIntelligence::TextDetectionConfig
Config for TEXT_DETECTION.
Inherits from Protobuf::Message.
Accessors
$msg->language_hints()/$msg->language_hints($value)Type:
StringLanguage hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format.
Automatic language detection is performed if no hint is provided.
$msg->model()/$msg->model($value)Type:
StringModel to use for text detection. Supported values: "builtin/stable" (the default if unset) and "builtin/latest".
Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment
Video segment.
Inherits from Protobuf::Message.
Accessors
$msg->start_time_offset()/$msg->start_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).
$msg->end_time_offset()/$msg->end_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).
Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelSegment
Video segment level annotation results for label detection.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segment where a label was detected.
$msg->confidence()/$msg->confidence($value)Type:
FloatConfidence that the label is accurate. Range: [0, 1].
Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelFrame
Video frame level annotation results for label detection.
Inherits from Protobuf::Message.
Accessors
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
$msg->confidence()/$msg->confidence($value)Type:
FloatConfidence that the label is accurate. Range: [0, 1].
Google::Cloud::Videointelligence::V1::VideoIntelligence::Entity
Detected entity from video analysis.
Inherits from Protobuf::Message.
Accessors
$msg->entity_id()/$msg->entity_id($value)Type:
StringOpaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).
$msg->description()/$msg->description($value)Type:
StringTextual description, e.g., `Fixed-gear bicycle`.
$msg->language_code()/$msg->language_code($value)Type:
StringLanguage code for `description` in BCP-47 format.
Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation
Label annotation.
Inherits from Protobuf::Message.
Accessors
$msg->entity()/$msg->entity($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Entity)Detected entity.
$msg->category_entities()/$msg->category_entities($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Entity)Common categories for the detected entity. For example, 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`.
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelSegment)All video segments where a label was detected.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelFrame)All video frames where a label was detected.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::ExplicitContentFrame
Video frame level annotation results for explicit content.
Inherits from Protobuf::Message.
Accessors
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
$msg->pornography_likelihood()/$msg->pornography_likelihood($value)Type:
Enum(Google::Cloud::Videointelligence::V1::Likelihood)Likelihood of the pornography content..
Google::Cloud::Videointelligence::V1::VideoIntelligence::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.
Inherits from Protobuf::Message.
Accessors
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ExplicitContentFrame)All video frames where explicit content was detected.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingBox
Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].
Inherits from Protobuf::Message.
Accessors
$msg->left()/$msg->left($value)Type:
FloatLeft X coordinate.
$msg->top()/$msg->top($value)Type:
FloatTop Y coordinate.
$msg->right()/$msg->right($value)Type:
FloatRight X coordinate.
$msg->bottom()/$msg->bottom($value)Type:
FloatBottom Y coordinate.
Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceDetectionAnnotation
Face detection annotation.
Inherits from Protobuf::Message.
Accessors
$msg->tracks()/$msg->tracks($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Track)The face tracks with attributes.
$msg->thumbnail()/$msg->thumbnail($value)Type:
BytesThe thumbnail of a person's face.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::PersonDetectionAnnotation
Person detection annotation per video.
Inherits from Protobuf::Message.
Accessors
$msg->tracks()/$msg->tracks($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Track)The detected tracks of a person.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceSegment
Video segment level annotation results for face detection.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segment where a face was detected.
Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceFrame
Deprecated. No effect.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_bounding_boxes()/$msg->normalized_bounding_boxes($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingBox)Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceAnnotation
Deprecated. No effect.
Inherits from Protobuf::Message.
Accessors
$msg->thumbnail()/$msg->thumbnail($value)Type:
BytesThumbnail of a representative face view (in JPEG format).
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceSegment)All video segments where a face was detected.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceFrame)All video frames where a face was detected.
Google::Cloud::Videointelligence::V1::VideoIntelligence::TimestampedObject
For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_bounding_box()/$msg->normalized_bounding_box($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingBox)Normalized Bounding box in a frame, where the object is located.
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.
$msg->attributes()/$msg->attributes($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::DetectedAttribute)Optional. The attributes of the object in the bounding box.
$msg->landmarks()/$msg->landmarks($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::DetectedLandmark)Optional. The detected landmarks.
Google::Cloud::Videointelligence::V1::VideoIntelligence::Track
A track of an object instance.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segment of a track.
$msg->timestamped_objects()/$msg->timestamped_objects($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::TimestampedObject)The object with timestamp and attributes per frame in the track.
$msg->attributes()/$msg->attributes($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::DetectedAttribute)Optional. Attributes in the track level.
$msg->confidence()/$msg->confidence($value)Type:
FloatOptional. The confidence score of the tracked object.
Google::Cloud::Videointelligence::V1::VideoIntelligence::DetectedAttribute
A generic detected attribute represented by name in string format.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.
$msg->confidence()/$msg->confidence($value)Type:
FloatDetected attribute confidence. Range [0, 1].
$msg->value()/$msg->value($value)Type:
StringText value of the detection result. For example, the value for "HairColor" can be "black", "blonde", etc.
Google::Cloud::Videointelligence::V1::VideoIntelligence::DetectedLandmark
A generic detected landmark represented by name in string format and a 2D location.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe name of this landmark, for example, left_hand, right_shoulder.
$msg->point()/$msg->point($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedVertex)The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1.
$msg->confidence()/$msg->confidence($value)Type:
FloatThe confidence score of the detected landmark. Range [0, 1].
Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoAnnotationResults
Annotation results for a single video.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringVideo file location in [Cloud Storage](https://cloud.google.com/storage/).
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segment on which the annotation is run.
$msg->segment_label_annotations()/$msg->segment_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation)Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.
$msg->segment_presence_label_annotations()/$msg->segment_presence_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation)Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to "builtin/latest" in the request.
$msg->shot_label_annotations()/$msg->shot_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation)Topical label annotations on shot level. There is exactly one element for each unique label.
$msg->shot_presence_label_annotations()/$msg->shot_presence_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation)Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to "builtin/latest" in the request.
$msg->frame_label_annotations()/$msg->frame_label_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LabelAnnotation)Label annotations on frame level. There is exactly one element for each unique label.
$msg->face_annotations()/$msg->face_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceAnnotation)Deprecated. Please use `face_detection_annotations` instead.
$msg->face_detection_annotations()/$msg->face_detection_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::FaceDetectionAnnotation)Face detection annotations.
$msg->shot_annotations()/$msg->shot_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Shot annotations. Each shot is represented as a video segment.
$msg->explicit_annotation()/$msg->explicit_annotation($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ExplicitContentAnnotation)Explicit content annotation.
$msg->speech_transcriptions()/$msg->speech_transcriptions($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechTranscription)Speech transcription.
$msg->text_annotations()/$msg->text_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::TextAnnotation)OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.
$msg->object_annotations()/$msg->object_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingAnnotation)Annotations for list of objects detected and tracked in video.
$msg->logo_recognition_annotations()/$msg->logo_recognition_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::LogoRecognitionAnnotation)Annotations for list of logos detected, tracked and recognized in video.
$msg->person_detection_annotations()/$msg->person_detection_annotations($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::PersonDetectionAnnotation)Person detection annotations.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail.
Google::Cloud::Videointelligence::V1::VideoIntelligence::AnnotateVideoResponse
Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_results()/$msg->annotation_results($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoAnnotationResults)Annotation results for all videos specified in `AnnotateVideoRequest`.
Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoAnnotationProgress
Annotation progress for a single video.
Inherits from Protobuf::Message.
Accessors
$msg->input_uri()/$msg->input_uri($value)Type:
StringVideo file location in [Cloud Storage](https://cloud.google.com/storage/).
$msg->progress_percent()/$msg->progress_percent($value)Type:
Int32Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.
$msg->start_time()/$msg->start_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time when the request was received.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time of the most recent update.
$msg->feature()/$msg->feature($value)Type:
Enum(Google::Cloud::Videointelligence::V1::Feature)Specifies which feature is being tracked if the request contains more than one feature.
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Specifies which segment is being tracked if the request contains more than one segment.
Google::Cloud::Videointelligence::V1::VideoIntelligence::AnnotateVideoProgress
Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_progress()/$msg->annotation_progress($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoAnnotationProgress)Progress metadata for all videos specified in `AnnotateVideoRequest`.
Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechTranscriptionConfig
Config for SPEECH_TRANSCRIPTION.
Inherits from Protobuf::Message.
Accessors
$msg->language_code()/$msg->language_code($value)Type:
StringRequired. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.
$msg->max_alternatives()/$msg->max_alternatives($value)Type:
Int32Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.
$msg->filter_profanity()/$msg->filter_profanity($value)Type:
BoolOptional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. "f***". If set to `false` or omitted, profanities won't be filtered out.
$msg->speech_contexts()/$msg->speech_contexts($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechContext)Optional. A means to provide context to assist the speech recognition.
$msg->enable_automatic_punctuation()/$msg->enable_automatic_punctuation($value)Type:
BoolOptional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: "This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature."
$msg->audio_tracks()/$msg->audio_tracks($value)Type:
Int32Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.
$msg->enable_speaker_diarization()/$msg->enable_speaker_diarization($value)Type:
BoolOptional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.
$msg->diarization_speaker_count()/$msg->diarization_speaker_count($value)Type:
Int32Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
$msg->enable_word_confidence()/$msg->enable_word_confidence($value)Type:
BoolOptional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.
Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechContext
Provides "hints" to the speech recognizer to favor specific words and phrases in the results.
Inherits from Protobuf::Message.
Accessors
$msg->phrases()/$msg->phrases($value)Type:
StringOptional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechTranscription
A speech recognition result corresponding to a portion of the audio.
Inherits from Protobuf::Message.
Accessors
$msg->alternatives()/$msg->alternatives($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechRecognitionAlternative)May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
$msg->language_code()/$msg->language_code($value)Type:
StringOutput only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
Google::Cloud::Videointelligence::V1::VideoIntelligence::SpeechRecognitionAlternative
Alternative hypotheses (a.k.a. n-best list).
Inherits from Protobuf::Message.
Accessors
$msg->transcript()/$msg->transcript($value)Type:
StringTranscript text representing the words that the user spoke.
$msg->confidence()/$msg->confidence($value)Type:
FloatOutput 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 set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
$msg->words()/$msg->words($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::WordInfo)Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.
Google::Cloud::Videointelligence::V1::VideoIntelligence::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`.
Inherits from Protobuf::Message.
Accessors
$msg->start_time()/$msg->start_time($value)Type:
Message(Google::Protobuf::Duration::Duration)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.
$msg->end_time()/$msg->end_time($value)Type:
Message(Google::Protobuf::Duration::Duration)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.
$msg->word()/$msg->word($value)Type:
StringThe word corresponding to this set of information.
$msg->confidence()/$msg->confidence($value)Type:
FloatOutput 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 set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
$msg->speaker_tag()/$msg->speaker_tag($value)Type:
Int32Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.
Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedVertex
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
Inherits from Protobuf::Message.
Accessors
$msg->x()/$msg->x($value)Type:
FloatX coordinate.
$msg->y()/$msg->y($value)Type:
FloatY coordinate.
Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingPoly
Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2
When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0
and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.
Inherits from Protobuf::Message.
Accessors
$msg->vertices()/$msg->vertices($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedVertex)Normalized vertices of the bounding polygon.
Google::Cloud::Videointelligence::V1::VideoIntelligence::TextSegment
Video segment level annotation results for text detection.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Video segment where a text snippet was detected.
$msg->confidence()/$msg->confidence($value)Type:
FloatConfidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::TextFrame)Information related to the frames where OCR detected text appears.
Google::Cloud::Videointelligence::V1::VideoIntelligence::TextFrame
Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.
Inherits from Protobuf::Message.
Accessors
$msg->rotated_bounding_box()/$msg->rotated_bounding_box($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingPoly)Bounding polygon of the detected text for this frame.
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Timestamp of this frame.
Google::Cloud::Videointelligence::V1::VideoIntelligence::TextAnnotation
Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringThe detected text.
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::TextSegment)All video segments where OCR detected text appears.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingFrame
Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_bounding_box()/$msg->normalized_bounding_box($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::NormalizedBoundingBox)The normalized bounding box location of this object track for the frame.
$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)The timestamp of the frame in microseconds.
Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingAnnotation
Annotations corresponding to one tracked object.
Inherits from Protobuf::Message.
Accessors
$msg->segment()/$msg->segment($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears.
$msg->track_id()/$msg->track_id($value)Type:
Int64Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.
$msg->entity()/$msg->entity($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Entity)Entity to specify the object category that this track is labeled as.
$msg->confidence()/$msg->confidence($value)Type:
FloatObject category's labeling confidence of this track.
$msg->frames()/$msg->frames($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::ObjectTrackingFrame)Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.
$msg->version()/$msg->version($value)Type:
StringFeature version.
Google::Cloud::Videointelligence::V1::VideoIntelligence::LogoRecognitionAnnotation
Annotation corresponding to one detected, tracked and recognized logo class.
Inherits from Protobuf::Message.
Accessors
$msg->entity()/$msg->entity($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Entity)Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as.
$msg->tracks()/$msg->tracks($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::Track)All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.
$msg->segments()/$msg->segments($value)Type:
Message(Google::Cloud::Videointelligence::V1::VideoIntelligence::VideoSegment)All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Videointelligence::V1::VideoIntelligence::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.