blob: e6552597ff076a79ceed4870044888cc09a105fb [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="videointelligence_v1p3beta1.html">Cloud Video Intelligence API</a> . <a href="videointelligence_v1p3beta1.videos.html">videos</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#annotate">annotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Performs asynchronous video annotation. Progress and results can be</p>
80<h3>Method Details</h3>
81<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070082 <code class="details" id="annotate">annotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083 <pre>Performs asynchronous video annotation. Progress and results can be
84retrieved through the `google.longrunning.Operations` interface.
85`Operation.metadata` contains `AnnotateVideoProgress` (progress).
86`Operation.response` contains `AnnotateVideoResponse` (results).
87
88Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070089 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 The object takes the form of:
91
92{ # Video annotation request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070093 &quot;locationId&quot;: &quot;A String&quot;, # Optional. Cloud region where annotation should take place. Supported cloud
94 # regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
95 # region is specified, the region will be determined based on video file
96 # location.
97 &quot;inputUri&quot;: &quot;A String&quot;, # Input video location. Currently, only
98 # [Cloud Storage](https://cloud.google.com/storage/) URIs are
99 # supported. URIs must be specified in the following format:
100 # `gs://bucket-id/object-id` (other URI formats return
101 # google.rpc.Code.INVALID_ARGUMENT). For more information, see
102 # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
103 # To identify multiple videos, a video URI may include wildcards in the
104 # `object-id`. Supported wildcards: &#x27;*&#x27; to match 0 or more characters;
105 # &#x27;?&#x27; to match 1 character. If unset, the input video should be embedded
106 # in the request as `input_content`. If set, `input_content` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;inputContent&quot;: &quot;A String&quot;, # The video data bytes.
108 # If unset, the input video(s) should be specified via the `input_uri`.
109 # If set, `input_uri` must be unset.
110 &quot;features&quot;: [ # Required. Requested video annotation features.
111 &quot;A String&quot;,
112 ],
113 &quot;outputUri&quot;: &quot;A String&quot;, # Optional. Location where the output (in JSON format) should be stored.
114 # Currently, only [Cloud Storage](https://cloud.google.com/storage/)
115 # URIs are supported. These must be specified in the following format:
116 # `gs://bucket-id/object-id` (other URI formats return
117 # google.rpc.Code.INVALID_ARGUMENT). For more information, see
118 # [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
119 &quot;videoContext&quot;: { # Video context and/or feature-specific parameters. # Additional video context and/or feature-specific parameters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700120 &quot;segments&quot;: [ # Video segments to annotate. The segments may overlap and are not required
121 # to be contiguous or span the whole video. If unspecified, each video is
122 # treated as a single segment.
123 { # Video segment.
124 &quot;endTimeOffset&quot;: &quot;A String&quot;, # Time-offset, relative to the beginning of the video,
125 # corresponding to the end of the segment (inclusive).
126 &quot;startTimeOffset&quot;: &quot;A String&quot;, # Time-offset, relative to the beginning of the video,
127 # corresponding to the start of the segment (inclusive).
128 },
129 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;textDetectionConfig&quot;: { # Config for TEXT_DETECTION. # Config for TEXT_DETECTION.
131 &quot;languageHints&quot;: [ # Language hint can be specified if the language to be detected is known a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 # priori. It can increase the accuracy of the detection. Language hint must
133 # be language code in BCP-47 format.
134 #
135 # Automatic language detection is performed if no hint is provided.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;model&quot;: &quot;A String&quot;, # Model to use for text detection.
139 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
140 # &quot;builtin/latest&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700142 &quot;shotChangeDetectionConfig&quot;: { # Config for SHOT_CHANGE_DETECTION. # Config for SHOT_CHANGE_DETECTION.
143 &quot;model&quot;: &quot;A String&quot;, # Model to use for shot change detection.
144 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
145 # &quot;builtin/latest&quot;.
146 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;labelDetectionConfig&quot;: { # Config for LABEL_DETECTION. # Config for LABEL_DETECTION.
148 &quot;model&quot;: &quot;A String&quot;, # Model to use for label detection.
149 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
150 # &quot;builtin/latest&quot;.
151 &quot;labelDetectionMode&quot;: &quot;A String&quot;, # What labels should be detected with LABEL_DETECTION, in addition to
152 # video-level labels or segment-level labels.
153 # If unspecified, defaults to `SHOT_MODE`.
154 &quot;stationaryCamera&quot;: True or False, # Whether the video has been shot from a stationary (i.e., non-moving)
155 # camera. When set to true, might improve detection accuracy for moving
156 # objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.
157 &quot;videoConfidenceThreshold&quot;: 3.14, # The confidence threshold we perform filtering on the labels from
158 # video-level and shot-level detections. If not set, it&#x27;s set to 0.3 by
159 # default. The valid range for this threshold is [0.1, 0.9]. Any value set
160 # outside of this range will be clipped.
161 # Note: For best results, follow the default threshold. We will update
162 # the default threshold everytime when we release a new model.
163 &quot;frameConfidenceThreshold&quot;: 3.14, # The confidence threshold we perform filtering on the labels from
164 # frame-level detection. If not set, it is set to 0.4 by default. The valid
165 # range for this threshold is [0.1, 0.9]. Any value set outside of this
166 # range will be clipped.
167 # Note: For best results, follow the default threshold. We will update
168 # the default threshold everytime when we release a new model.
169 },
170 &quot;faceDetectionConfig&quot;: { # Config for FACE_DETECTION. # Config for FACE_DETECTION.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700171 &quot;includeBoundingBoxes&quot;: True or False, # Whether bounding boxes are included in the face annotation output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;includeAttributes&quot;: True or False, # Whether to enable face attributes detection, such as glasses, dark_glasses,
173 # mouth_open etc. Ignored if &#x27;include_bounding_boxes&#x27; is set to false.
174 &quot;model&quot;: &quot;A String&quot;, # Model to use for face detection.
175 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
176 # &quot;builtin/latest&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 },
178 &quot;explicitContentDetectionConfig&quot;: { # Config for EXPLICIT_CONTENT_DETECTION. # Config for EXPLICIT_CONTENT_DETECTION.
179 &quot;model&quot;: &quot;A String&quot;, # Model to use for explicit content detection.
180 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
181 # &quot;builtin/latest&quot;.
182 },
183 &quot;objectTrackingConfig&quot;: { # Config for OBJECT_TRACKING. # Config for OBJECT_TRACKING.
184 &quot;model&quot;: &quot;A String&quot;, # Model to use for object tracking.
185 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
186 # &quot;builtin/latest&quot;.
187 },
188 &quot;personDetectionConfig&quot;: { # Config for PERSON_DETECTION. # Config for PERSON_DETECTION.
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 &quot;includeAttributes&quot;: True or False, # Whether to enable person attributes detection, such as cloth color (black,
190 # blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair,
191 # etc.
192 # Ignored if &#x27;include_bounding_boxes&#x27; is set to false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700193 &quot;includePoseLandmarks&quot;: True or False, # Whether to enable pose landmarks detection. Ignored if
194 # &#x27;include_bounding_boxes&#x27; is set to false.
195 &quot;includeBoundingBoxes&quot;: True or False, # Whether bounding boxes are included in the person detection annotation
196 # output.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 },
198 &quot;speechTranscriptionConfig&quot;: { # Config for SPEECH_TRANSCRIPTION. # Config for SPEECH_TRANSCRIPTION.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700199 &quot;enableAutomaticPunctuation&quot;: True or False, # Optional. If &#x27;true&#x27;, adds punctuation to recognition result hypotheses.
200 # This feature is only available in select languages. Setting this for
201 # requests in other languages has no effect at all. The default &#x27;false&#x27; value
202 # does not add punctuation to result hypotheses. NOTE: &quot;This is currently
203 # offered as an experimental service, complimentary to all users. In the
204 # future this may be exclusively available as a premium feature.&quot;
205 &quot;audioTracks&quot;: [ # Optional. For file formats, such as MXF or MKV, supporting multiple audio
206 # tracks, specify up to two tracks. Default: track 0.
207 42,
208 ],
209 &quot;maxAlternatives&quot;: 42, # Optional. Maximum number of recognition hypotheses to be returned.
210 # Specifically, the maximum number of `SpeechRecognitionAlternative` messages
211 # within each `SpeechTranscription`. The server may return fewer than
212 # `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will
213 # return a maximum of one. If omitted, will return a maximum of one.
214 &quot;diarizationSpeakerCount&quot;: 42, # Optional. If set, specifies the estimated number of speakers in the conversation.
215 # If not set, defaults to &#x27;2&#x27;.
216 # Ignored unless enable_speaker_diarization is set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;languageCode&quot;: &quot;A String&quot;, # Required. *Required* The language of the supplied audio as a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 # Example: &quot;en-US&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 # See [Language Support](https://cloud.google.com/speech/docs/languages)
221 # for a list of the currently supported language codes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700222 &quot;filterProfanity&quot;: True or False, # Optional. If set to `true`, the server will attempt to filter out
223 # profanities, replacing all but the initial character in each filtered word
224 # with asterisks, e.g. &quot;f***&quot;. If set to `false` or omitted, profanities
225 # won&#x27;t be filtered out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700226 &quot;speechContexts&quot;: [ # Optional. A means to provide context to assist the speech recognition.
227 { # Provides &quot;hints&quot; to the speech recognizer to favor specific words and phrases
228 # in the results.
229 &quot;phrases&quot;: [ # Optional. A list of strings containing words and phrases &quot;hints&quot; so that
230 # the speech recognition is more likely to recognize them. This can be used
231 # to improve the accuracy for specific words and phrases, for example, if
232 # specific commands are typically spoken by the user. This can also be used
233 # to add additional words to the vocabulary of the recognizer. See
234 # [usage limits](https://cloud.google.com/speech/limits#content).
235 &quot;A String&quot;,
236 ],
237 },
238 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;enableSpeakerDiarization&quot;: True or False, # Optional. If &#x27;true&#x27;, enables speaker detection for each recognized word in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700240 # the top alternative of the recognition result using a speaker_tag provided
241 # in the WordInfo.
242 # Note: When this is true, we send all the words from the beginning of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 # audio for the top alternative in every consecutive response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 # This is done in order to improve our speaker tags as our models learn to
245 # identify the speakers in the conversation over time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &quot;enableWordConfidence&quot;: True or False, # Optional. If `true`, the top result includes a list of words and the
247 # confidence for those words. If `false`, no word-level confidence
248 # information is returned. The default is `false`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 }
252
253 x__xgafv: string, V1 error format.
254 Allowed values
255 1 - v1 error format
256 2 - v2 error format
257
258Returns:
259 An object of the form:
260
261 { # This resource represents a long-running operation that is the result of a
262 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700263 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 # different programming environments, including REST APIs and RPC APIs. It is
265 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
266 # three pieces of data: error code, error message, and error details.
267 #
268 # You can find out more about this error model and how to work with it in the
269 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # user-facing error message should be localized and sent in the
272 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700273 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 # message types for APIs to use.
275 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 },
278 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700279 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
282 # contains progress information and common metadata such as create time.
283 # Some services might not provide such metadata. Any method that returns a
284 # long-running operation should document the metadata type, if any.
285 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
286 },
287 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700288 # If `true`, the operation is completed, and either `error` or `response` is
289 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 # method returns no data on success, such as `Delete`, the response is
292 # `google.protobuf.Empty`. If the original method is standard
293 # `Get`/`Create`/`Update`, the response should be the resource. For other
294 # methods, the response should have the type `XxxResponse`, where `Xxx`
295 # is the original method name. For example, if the original method name
296 # is `TakeSnapshot()`, the inferred response type is
297 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700299 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 # originally returns it. If you use the default HTTP mapping, the
302 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 }</pre>
304</div>
305
306</body></html>