Types for Google Cloud Videointelligence v1p1beta1 API¶
- class google.cloud.videointelligence_v1p1beta1.types.AnnotateVideoProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video annotation progress. Included in the
metadata
field of theOperation
returned by theGetOperation
call of thegoogle::longrunning::Operations
service.- annotation_progress¶
Progress metadata for all videos specified in
AnnotateVideoRequest
.- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.VideoAnnotationProgress]
- class google.cloud.videointelligence_v1p1beta1.types.AnnotateVideoRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video annotation request.
- input_uri¶
Input video location. Currently, only Google Cloud Storage URIs are supported, which 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. A video URI may include wildcards inobject-id
, and thus identify multiple videos. Supported wildcards: ‘*’ to match 0 or more characters; ‘?’ to match 1 character. If unset, the input video should be embedded in the request asinput_content
. If set,input_content
should be unset.- Type
- input_content¶
The video data bytes. If unset, the input video(s) should be specified via
input_uri
. If set,input_uri
should be unset.- Type
- features¶
Required. Requested video annotation features.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.Feature]
- video_context¶
Additional video context and/or feature-specific parameters.
- output_uri¶
Optional. Location where the output (in JSON format) should be stored. Currently, only Google Cloud Storage URIs are supported, which 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.- Type
- class google.cloud.videointelligence_v1p1beta1.types.AnnotateVideoResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video annotation response. Included in the
response
field of theOperation
returned by theGetOperation
call of thegoogle::longrunning::Operations
service.- annotation_results¶
Annotation results for all videos specified in
AnnotateVideoRequest
.- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.VideoAnnotationResults]
- class google.cloud.videointelligence_v1p1beta1.types.Entity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detected entity from video analysis.
- entity_id¶
Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.
- Type
- class google.cloud.videointelligence_v1p1beta1.types.ExplicitContentAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- frames¶
All video frames where explicit content was detected.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.ExplicitContentFrame]
- class google.cloud.videointelligence_v1p1beta1.types.ExplicitContentDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for EXPLICIT_CONTENT_DETECTION.
- class google.cloud.videointelligence_v1p1beta1.types.ExplicitContentFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video frame level annotation results for explicit content.
- time_offset¶
Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
- pornography_likelihood¶
Likelihood of the pornography content..
- class google.cloud.videointelligence_v1p1beta1.types.Feature(value)[source]¶
Bases:
proto.enums.Enum
Video annotation feature.
- Values:
- FEATURE_UNSPECIFIED (0):
Unspecified.
- LABEL_DETECTION (1):
Label detection. Detect objects, such as dog or flower.
- SHOT_CHANGE_DETECTION (2):
Shot change detection.
- EXPLICIT_CONTENT_DETECTION (3):
Explicit content detection.
- SPEECH_TRANSCRIPTION (6):
Speech transcription.
- class google.cloud.videointelligence_v1p1beta1.types.LabelAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Label annotation.
- entity¶
Detected entity.
- category_entities¶
Common categories for the detected entity. E.g. when the label is
Terrier
the category is likelydog
. And in some cases there might be more than one categories e.g.Terrier
could also be apet
.- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.Entity]
- segments¶
All video segments where a label was detected.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.LabelSegment]
- frames¶
All video frames where a label was detected.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.LabelFrame]
- class google.cloud.videointelligence_v1p1beta1.types.LabelDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for LABEL_DETECTION.
- label_detection_mode¶
What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to
SHOT_MODE
.
- stationary_camera¶
Whether 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.- Type
- class google.cloud.videointelligence_v1p1beta1.types.LabelDetectionMode(value)[source]¶
Bases:
proto.enums.Enum
Label detection mode.
- Values:
- LABEL_DETECTION_MODE_UNSPECIFIED (0):
Unspecified.
- SHOT_MODE (1):
Detect shot-level labels.
- FRAME_MODE (2):
Detect frame-level labels.
- SHOT_AND_FRAME_MODE (3):
Detect both shot-level and frame-level labels.
- class google.cloud.videointelligence_v1p1beta1.types.LabelFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video frame level annotation results for label detection.
- time_offset¶
Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.
- class google.cloud.videointelligence_v1p1beta1.types.LabelSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video segment level annotation results for label detection.
- segment¶
Video segment where a label was detected.
- class google.cloud.videointelligence_v1p1beta1.types.Likelihood(value)[source]¶
Bases:
proto.enums.Enum
Bucketized representation of likelihood.
- Values:
- LIKELIHOOD_UNSPECIFIED (0):
Unspecified likelihood.
- VERY_UNLIKELY (1):
Very unlikely.
- UNLIKELY (2):
Unlikely.
- POSSIBLE (3):
Possible.
- LIKELY (4):
Likely.
- VERY_LIKELY (5):
Very likely.
- class google.cloud.videointelligence_v1p1beta1.types.ShotChangeDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for SHOT_CHANGE_DETECTION.
- class google.cloud.videointelligence_v1p1beta1.types.SpeechContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Provides “hints” to the speech recognizer to favor specific words and phrases in the results.
- phrases¶
Optional. 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.
- Type
MutableSequence[str]
- class google.cloud.videointelligence_v1p1beta1.types.SpeechRecognitionAlternative(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Alternative hypotheses (a.k.a. n-best list).
- confidence¶
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 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.- Type
- words¶
Output only. A list of word-specific information for each recognized word.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.WordInfo]
- class google.cloud.videointelligence_v1p1beta1.types.SpeechTranscription(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A speech recognition result corresponding to a portion of the audio.
- alternatives¶
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.- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.SpeechRecognitionAlternative]
- class google.cloud.videointelligence_v1p1beta1.types.SpeechTranscriptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for SPEECH_TRANSCRIPTION.
- language_code¶
Required. Required The language of the supplied audio as a BCP-47 language tag. Example: “en-US”. See Language Support for a list of the currently supported language codes.
- Type
- max_alternatives¶
Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of
SpeechRecognitionAlternative
messages within eachSpeechTranscription
. The server may return fewer thanmax_alternatives
. Valid values are0
-30
. A value of0
or1
will return a maximum of one. If omitted, will return a maximum of one.- Type
- filter_profanity¶
Optional. 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 tofalse
or omitted, profanities won’t be filtered out.- Type
- speech_contexts¶
Optional. A means to provide context to assist the speech recognition.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.SpeechContext]
- enable_automatic_punctuation¶
Optional. 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.”.
- Type
- class google.cloud.videointelligence_v1p1beta1.types.VideoAnnotationProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Annotation progress for a single video.
- input_uri¶
Output only. Video file location in Google Cloud Storage.
- Type
- progress_percent¶
Output only. Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.
- Type
- start_time¶
Output only. Time when the request was received.
- update_time¶
Output only. Time of the most recent update.
- class google.cloud.videointelligence_v1p1beta1.types.VideoAnnotationResults(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Annotation results for a single video.
- input_uri¶
Output only. Video file location in Google Cloud Storage.
- Type
- segment_label_annotations¶
Label annotations on video level or user specified segment level. There is exactly one element for each unique label.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.LabelAnnotation]
- shot_label_annotations¶
Label annotations on shot level. There is exactly one element for each unique label.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.LabelAnnotation]
- frame_label_annotations¶
Label annotations on frame level. There is exactly one element for each unique label.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.LabelAnnotation]
- shot_annotations¶
Shot annotations. Each shot is represented as a video segment.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.VideoSegment]
- explicit_annotation¶
Explicit content annotation.
- speech_transcriptions¶
Speech transcription.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.SpeechTranscription]
- error¶
Output only. If set, indicates an error. Note that for a single
AnnotateVideoRequest
some videos may succeed and some may fail.- Type
google.rpc.status_pb2.Status
- class google.cloud.videointelligence_v1p1beta1.types.VideoContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video context and/or feature-specific parameters.
- segments¶
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.
- Type
MutableSequence[google.cloud.videointelligence_v1p1beta1.types.VideoSegment]
- label_detection_config¶
Config for LABEL_DETECTION.
- shot_change_detection_config¶
Config for SHOT_CHANGE_DETECTION.
- explicit_content_detection_config¶
Config for EXPLICIT_CONTENT_DETECTION.
- speech_transcription_config¶
Config for SPEECH_TRANSCRIPTION.
- class google.cloud.videointelligence_v1p1beta1.types.VideoSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Video segment.
- start_time_offset¶
Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).
- end_time_offset¶
Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).
- class google.cloud.videointelligence_v1p1beta1.types.WordInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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
.- start_time¶
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.
- end_time¶
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.