asset: add annotations to v1p1beta1
PiperOrigin-RevId: 292009868
This commit is contained in:
parent
e19209fac2
commit
9c483584f8
|
|
@ -16,6 +16,8 @@ proto_library(
|
|||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"//google/rpc:status_proto",
|
||||
"@com_google_protobuf//:duration_proto",
|
||||
|
|
@ -161,6 +163,8 @@ moved_proto_library(
|
|||
srcs = [":videointelligence_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"//google/rpc:status_proto",
|
||||
"@com_google_protobuf//:duration_proto",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,15 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.videointelligence.v1p1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/longrunning/operations.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
|
@ -32,16 +35,23 @@ option ruby_package = "Google::Cloud::VideoIntelligence::V1p1beta1";
|
|||
|
||||
// Service that implements Google Cloud Video Intelligence API.
|
||||
service VideoIntelligenceService {
|
||||
option (google.api.default_host) = "videointelligence.googleapis.com";
|
||||
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
|
||||
|
||||
// Performs asynchronous video annotation. Progress and results can be
|
||||
// retrieved through the `google.longrunning.Operations` interface.
|
||||
// `Operation.metadata` contains `AnnotateVideoProgress` (progress).
|
||||
// `Operation.response` contains `AnnotateVideoResponse` (results).
|
||||
rpc AnnotateVideo(AnnotateVideoRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
rpc AnnotateVideo(AnnotateVideoRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1p1beta1/videos:annotate"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "input_uri,features";
|
||||
option (google.longrunning.operation_info) = {
|
||||
response_type: "AnnotateVideoResponse"
|
||||
metadata_type: "AnnotateVideoProgress"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +61,10 @@ message AnnotateVideoRequest {
|
|||
// [Google Cloud Storage](https://cloud.google.com/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](/storage/docs/reference-uris). A video
|
||||
// URI may include wildcards in `object-id`, and thus identify multiple
|
||||
// videos. Supported wildcards: '*' to match 0 or more characters;
|
||||
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
|
||||
// [Request URIs](/storage/docs/reference-uris).
|
||||
// A video URI may include wildcards in `object-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 as `input_content`. If set, `input_content` should be unset.
|
||||
string input_uri = 1;
|
||||
|
|
@ -64,24 +74,24 @@ message AnnotateVideoRequest {
|
|||
// If set, `input_uri` should be unset.
|
||||
bytes input_content = 6;
|
||||
|
||||
// Requested video annotation features.
|
||||
repeated Feature features = 2;
|
||||
// Required. Requested video annotation features.
|
||||
repeated Feature features = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Additional video context and/or feature-specific parameters.
|
||||
VideoContext video_context = 3;
|
||||
|
||||
// Optional location where the output (in JSON format) should be stored.
|
||||
// Optional. Location where the output (in JSON format) should be stored.
|
||||
// Currently, only [Google Cloud Storage](https://cloud.google.com/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](/storage/docs/reference-uris).
|
||||
string output_uri = 4;
|
||||
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
|
||||
// [Request URIs](/storage/docs/reference-uris).
|
||||
string output_uri = 4 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// Optional cloud region where annotation should take place. Supported cloud
|
||||
// Optional. Cloud region where annotation should take place. Supported cloud
|
||||
// regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
|
||||
// is specified, a region will be determined based on video file location.
|
||||
string location_id = 5;
|
||||
string location_id = 5 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Video context and/or feature-specific parameters.
|
||||
|
|
@ -285,60 +295,60 @@ message AnnotateVideoProgress {
|
|||
|
||||
// Config for SPEECH_TRANSCRIPTION.
|
||||
message SpeechTranscriptionConfig {
|
||||
// *Required* The language of the supplied audio as a
|
||||
// Required. *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.
|
||||
string language_code = 1;
|
||||
string language_code = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// *Optional* Maximum number of recognition hypotheses to be returned.
|
||||
// Optional. Maximum number of recognition hypotheses to be returned.
|
||||
// Specifically, the maximum number of `SpeechRecognitionAlternative` messages
|
||||
// within each `SpeechRecognitionResult`. The server may return fewer than
|
||||
// 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.
|
||||
int32 max_alternatives = 2;
|
||||
int32 max_alternatives = 2 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// *Optional* If set to `true`, the server will attempt to filter out
|
||||
// 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 to `false` or omitted, profanities
|
||||
// won't be filtered out.
|
||||
bool filter_profanity = 3;
|
||||
bool filter_profanity = 3 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// *Optional* A means to provide context to assist the speech recognition.
|
||||
repeated SpeechContext speech_contexts = 4;
|
||||
// Optional. A means to provide context to assist the speech recognition.
|
||||
repeated SpeechContext speech_contexts = 4 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// *Optional* If 'true', adds punctuation to recognition result hypotheses.
|
||||
// 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."
|
||||
bool enable_automatic_punctuation = 5;
|
||||
bool enable_automatic_punctuation = 5 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// *Optional* For file formats, such as MXF or MKV, supporting multiple audio
|
||||
// Optional. For file formats, such as MXF or MKV, supporting multiple audio
|
||||
// tracks, specify up to two tracks. Default: track 0.
|
||||
repeated int32 audio_tracks = 6;
|
||||
repeated int32 audio_tracks = 6 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Provides "hints" to the speech recognizer to favor specific words and phrases
|
||||
// in the results.
|
||||
message SpeechContext {
|
||||
// *Optional* A list of strings containing words and phrases "hints" so that
|
||||
// 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](https://cloud.google.com/speech/limits#content).
|
||||
repeated string phrases = 1;
|
||||
repeated string phrases = 1 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// A speech recognition result corresponding to a portion of the audio.
|
||||
message SpeechTranscription {
|
||||
// Output only. 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.
|
||||
// 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.
|
||||
repeated SpeechRecognitionAlternative alternatives = 1;
|
||||
}
|
||||
|
||||
|
|
@ -349,11 +359,11 @@ message SpeechRecognitionAlternative {
|
|||
|
||||
// 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.
|
||||
// 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.
|
||||
float confidence = 2;
|
||||
float confidence = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. A list of word-specific information for each recognized word.
|
||||
repeated WordInfo words = 3;
|
||||
|
|
|
|||
Loading…
Reference in New Issue