Skip to content

Commit

Permalink
feat: add locations metadata proto file (#5565)
Browse files Browse the repository at this point in the history
* feat: add locations metadata proto file
docs: update the list of automatically detected encodings
docs: update the maximum number of files that may be included in a BatchRecognizeRequest

PiperOrigin-RevId: 653986958

Source-Link: googleapis/googleapis@58cd55f

Source-Link: googleapis/googleapis-gen@7d99f9c
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiN2Q5OWY5YzFkMWViMTEzZjU5YzAwZDUyZDc0YjJjZTA2YzE4ZWMyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 22, 2024
1 parent 506973d commit 910c9d4
Show file tree
Hide file tree
Showing 10 changed files with 2,775 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package google.cloud.speech.v2;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/api/resource.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
Expand Down Expand Up @@ -706,7 +707,11 @@ message Recognizer {
//
// * WEBM_OPUS: Opus audio frames in a WebM container.
//
// * M4A: M4A audio format.
// * MP4_AAC: AAC audio frames in an MP4 container.
//
// * M4A_AAC: AAC audio frames in an M4A container.
//
// * MOV_AAC: AAC audio frames in an MOV container.
message AutoDetectDecodingConfig {}

// Explicitly specified decoding parameters.
Expand Down Expand Up @@ -1020,6 +1025,9 @@ message RecognizeRequest {

// Metadata about the recognition request and response.
message RecognitionResponseMetadata {
// Global request identifier auto-generated by the API.
string request_id = 9 [(google.api.field_info).format = UUID4];

// When available, billed audio seconds for the corresponding request.
google.protobuf.Duration total_billed_duration = 6;
}
Expand Down Expand Up @@ -1273,7 +1281,7 @@ message BatchRecognizeRequest {
google.protobuf.FieldMask config_mask = 5;

// Audio files with file metadata for ASR.
// The maximum number of files allowed to be specified is 5.
// The maximum number of files allowed to be specified is 15.
repeated BatchRecognizeFileMetadata files = 3;

// Configuration options for where to output the transcripts of each file.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// 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.speech.v2;

option go_package = "cloud.google.com/go/speech/apiv2/speechpb;speechpb";
option java_multiple_files = true;
option java_outer_classname = "LocationsMetadataProto";
option java_package = "com.google.cloud.speech.v2";

// Representes a singular feature of a model. If the feature is `recognizer`,
// the release_state of the feature represents the release_state of the model
message ModelFeature {
// The name of the feature (Note: the feature can be `recognizer`)
string feature = 1;

// The release state of the feature
string release_state = 2;
}

// Represents the collection of features belonging to a model
message ModelFeatures {
// Repeated field that contains all features of the model
repeated ModelFeature model_feature = 1;
}

// The metadata about the models in a given region for a specific locale.
// Currently this is just the features of the model
message ModelMetadata {
// Map of the model name -> features of that model
map<string, ModelFeatures> model_features = 1;
}

// The metadata about locales available in a given region. Currently this is
// just the models that are available for each locale
message LanguageMetadata {
// Map of locale (language code) -> models
map<string, ModelMetadata> models = 1;
}

// The access metadata for a particular region. This can be applied if the org
// policy for the given project disallows a particular region.
message AccessMetadata {
// Describes the different types of constraints that can be applied on a
// region.
enum ConstraintType {
// Unspecified constraint applied.
CONSTRAINT_TYPE_UNSPECIFIED = 0;

// The project's org policy disallows the given region.
RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT = 1;
}

// Describes the different types of constraints that are applied.
ConstraintType constraint_type = 1;
}

// Main metadata for the Locations API for STT V2. Currently this is just the
// metadata about locales, models, and features
message LocationsMetadata {
// Information about available locales, models, and features represented in
// the hierarchical structure of locales -> models -> features
LanguageMetadata languages = 1;

// Information about access metadata for the region and given project.
AccessMetadata access_metadata = 2;
}
Loading

0 comments on commit 910c9d4

Please sign in to comment.