Skip to content

Commit 910c9d4

Browse files
feat: add locations metadata proto file (#5565)
* 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>
1 parent 506973d commit 910c9d4

File tree

10 files changed

+2775
-144
lines changed

10 files changed

+2775
-144
lines changed

packages/google-cloud-speech/protos/google/cloud/speech/v2/cloud_speech.proto

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.speech.v2;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22+
import "google/api/field_info.proto";
2223
import "google/api/resource.proto";
2324
import "google/longrunning/operations.proto";
2425
import "google/protobuf/duration.proto";
@@ -706,7 +707,11 @@ message Recognizer {
706707
//
707708
// * WEBM_OPUS: Opus audio frames in a WebM container.
708709
//
709-
// * M4A: M4A audio format.
710+
// * MP4_AAC: AAC audio frames in an MP4 container.
711+
//
712+
// * M4A_AAC: AAC audio frames in an M4A container.
713+
//
714+
// * MOV_AAC: AAC audio frames in an MOV container.
710715
message AutoDetectDecodingConfig {}
711716

712717
// Explicitly specified decoding parameters.
@@ -1020,6 +1025,9 @@ message RecognizeRequest {
10201025

10211026
// Metadata about the recognition request and response.
10221027
message RecognitionResponseMetadata {
1028+
// Global request identifier auto-generated by the API.
1029+
string request_id = 9 [(google.api.field_info).format = UUID4];
1030+
10231031
// When available, billed audio seconds for the corresponding request.
10241032
google.protobuf.Duration total_billed_duration = 6;
10251033
}
@@ -1273,7 +1281,7 @@ message BatchRecognizeRequest {
12731281
google.protobuf.FieldMask config_mask = 5;
12741282

12751283
// Audio files with file metadata for ASR.
1276-
// The maximum number of files allowed to be specified is 5.
1284+
// The maximum number of files allowed to be specified is 15.
12771285
repeated BatchRecognizeFileMetadata files = 3;
12781286

12791287
// Configuration options for where to output the transcripts of each file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.speech.v2;
18+
19+
option go_package = "cloud.google.com/go/speech/apiv2/speechpb;speechpb";
20+
option java_multiple_files = true;
21+
option java_outer_classname = "LocationsMetadataProto";
22+
option java_package = "com.google.cloud.speech.v2";
23+
24+
// Representes a singular feature of a model. If the feature is `recognizer`,
25+
// the release_state of the feature represents the release_state of the model
26+
message ModelFeature {
27+
// The name of the feature (Note: the feature can be `recognizer`)
28+
string feature = 1;
29+
30+
// The release state of the feature
31+
string release_state = 2;
32+
}
33+
34+
// Represents the collection of features belonging to a model
35+
message ModelFeatures {
36+
// Repeated field that contains all features of the model
37+
repeated ModelFeature model_feature = 1;
38+
}
39+
40+
// The metadata about the models in a given region for a specific locale.
41+
// Currently this is just the features of the model
42+
message ModelMetadata {
43+
// Map of the model name -> features of that model
44+
map<string, ModelFeatures> model_features = 1;
45+
}
46+
47+
// The metadata about locales available in a given region. Currently this is
48+
// just the models that are available for each locale
49+
message LanguageMetadata {
50+
// Map of locale (language code) -> models
51+
map<string, ModelMetadata> models = 1;
52+
}
53+
54+
// The access metadata for a particular region. This can be applied if the org
55+
// policy for the given project disallows a particular region.
56+
message AccessMetadata {
57+
// Describes the different types of constraints that can be applied on a
58+
// region.
59+
enum ConstraintType {
60+
// Unspecified constraint applied.
61+
CONSTRAINT_TYPE_UNSPECIFIED = 0;
62+
63+
// The project's org policy disallows the given region.
64+
RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT = 1;
65+
}
66+
67+
// Describes the different types of constraints that are applied.
68+
ConstraintType constraint_type = 1;
69+
}
70+
71+
// Main metadata for the Locations API for STT V2. Currently this is just the
72+
// metadata about locales, models, and features
73+
message LocationsMetadata {
74+
// Information about available locales, models, and features represented in
75+
// the hierarchical structure of locales -> models -> features
76+
LanguageMetadata languages = 1;
77+
78+
// Information about access metadata for the region and given project.
79+
AccessMetadata access_metadata = 2;
80+
}

0 commit comments

Comments
 (0)