Skip to content

Commit c8a382b

Browse files
Google APIscopybara-github
authored andcommitted
docs: Clarified boost usage
PiperOrigin-RevId: 506405333
1 parent 4eb6d9e commit c8a382b

4 files changed

Lines changed: 32 additions & 20 deletions

File tree

google/cloud/speech/v1/cloud_speech_adaptation.proto

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ option objc_class_prefix = "GCS";
3434
// Service that implements Google Cloud Speech Adaptation API.
3535
service Adaptation {
3636
option (google.api.default_host) = "speech.googleapis.com";
37-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
37+
option (google.api.oauth_scopes) =
38+
"https://www.googleapis.com/auth/cloud-platform";
3839

3940
// Create a set of phrase hints. Each item in the set can be a single word or
4041
// a multi-word phrase. The items in the PhraseSet are favored by the
@@ -86,7 +87,8 @@ service Adaptation {
8687
post: "/v1/{parent=projects/*/locations/*}/customClasses"
8788
body: "*"
8889
};
89-
option (google.api.method_signature) = "parent,custom_class,custom_class_id";
90+
option (google.api.method_signature) =
91+
"parent,custom_class,custom_class_id";
9092
}
9193

9294
// Get a custom class.
@@ -98,7 +100,8 @@ service Adaptation {
98100
}
99101

100102
// List custom classes.
101-
rpc ListCustomClasses(ListCustomClassesRequest) returns (ListCustomClassesResponse) {
103+
rpc ListCustomClasses(ListCustomClassesRequest)
104+
returns (ListCustomClassesResponse) {
102105
option (google.api.http) = {
103106
get: "/v1/{parent=projects/*/locations/*}/customClasses"
104107
};
@@ -115,7 +118,8 @@ service Adaptation {
115118
}
116119

117120
// Delete a custom class.
118-
rpc DeleteCustomClass(DeleteCustomClassRequest) returns (google.protobuf.Empty) {
121+
rpc DeleteCustomClass(DeleteCustomClassRequest)
122+
returns (google.protobuf.Empty) {
119123
option (google.api.http) = {
120124
delete: "/v1/{name=projects/*/locations/*/customClasses/*}"
121125
};
@@ -125,7 +129,8 @@ service Adaptation {
125129

126130
// Message sent by the client for the `CreatePhraseSet` method.
127131
message CreatePhraseSetRequest {
128-
// Required. The parent resource where this phrase set will be created. Format:
132+
// Required. The parent resource where this phrase set will be created.
133+
// Format:
129134
//
130135
// `projects/{project}/locations/{location}/phraseSets`
131136
//
@@ -248,7 +253,8 @@ message DeletePhraseSetRequest {
248253

249254
// Message sent by the client for the `CreateCustomClass` method.
250255
message CreateCustomClassRequest {
251-
// Required. The parent resource where this custom class will be created. Format:
256+
// Required. The parent resource where this custom class will be created.
257+
// Format:
252258
//
253259
// `projects/{project}/locations/{location}/customClasses`
254260
//

google/cloud/speech/v1/resource.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ message PhraseSet {
8282
// Speech-to-Text supports three locations: `global`, `us` (US North America),
8383
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
8484
// endpoint, use the `global` location. To specify a region, use a
85-
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
86-
// `eu` location value.
85+
// [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
86+
// with matching `us` or `eu` location value.
8787
message Phrase {
8888
// The phrase itself.
8989
string value = 1;
@@ -95,8 +95,8 @@ message PhraseSet {
9595
// boost will simply be ignored. Though `boost` can accept a wide range of
9696
// positive values, most use cases are best served
9797
// with values between 0 and 20. We recommend using a binary search approach
98-
// to finding the optimal value for your use case. Speech recognition
99-
// will skip PhraseSets with a boost value of 0.
98+
// to finding the optimal value for your use case as well as adding
99+
// phrases both with and without boost to your requests.
100100
float boost = 2;
101101
}
102102

@@ -113,8 +113,8 @@ message PhraseSet {
113113
// enabled, so negative boost will simply be ignored. Though `boost` can
114114
// accept a wide range of positive values, most use cases are best served with
115115
// values between 0 (exclusive) and 20. We recommend using a binary search
116-
// approach to finding the optimal value for your use case. Speech recognition
117-
// will skip PhraseSets with a boost value of 0.
116+
// approach to finding the optimal value for your use case as well as adding
117+
// phrases both with and without boost to your requests.
118118
float boost = 4;
119119
}
120120

google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ option objc_class_prefix = "GCS";
3434
// Service that implements Google Cloud Speech Adaptation API.
3535
service Adaptation {
3636
option (google.api.default_host) = "speech.googleapis.com";
37-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
37+
option (google.api.oauth_scopes) =
38+
"https://www.googleapis.com/auth/cloud-platform";
3839

3940
// Create a set of phrase hints. Each item in the set can be a single word or
4041
// a multi-word phrase. The items in the PhraseSet are favored by the
@@ -86,7 +87,8 @@ service Adaptation {
8687
post: "/v1p1beta1/{parent=projects/*/locations/*}/customClasses"
8788
body: "*"
8889
};
89-
option (google.api.method_signature) = "parent,custom_class,custom_class_id";
90+
option (google.api.method_signature) =
91+
"parent,custom_class,custom_class_id";
9092
}
9193

9294
// Get a custom class.
@@ -98,7 +100,8 @@ service Adaptation {
98100
}
99101

100102
// List custom classes.
101-
rpc ListCustomClasses(ListCustomClassesRequest) returns (ListCustomClassesResponse) {
103+
rpc ListCustomClasses(ListCustomClassesRequest)
104+
returns (ListCustomClassesResponse) {
102105
option (google.api.http) = {
103106
get: "/v1p1beta1/{parent=projects/*/locations/*}/customClasses"
104107
};
@@ -115,7 +118,8 @@ service Adaptation {
115118
}
116119

117120
// Delete a custom class.
118-
rpc DeleteCustomClass(DeleteCustomClassRequest) returns (google.protobuf.Empty) {
121+
rpc DeleteCustomClass(DeleteCustomClassRequest)
122+
returns (google.protobuf.Empty) {
119123
option (google.api.http) = {
120124
delete: "/v1p1beta1/{name=projects/*/locations/*/customClasses/*}"
121125
};
@@ -125,7 +129,8 @@ service Adaptation {
125129

126130
// Message sent by the client for the `CreatePhraseSet` method.
127131
message CreatePhraseSetRequest {
128-
// Required. The parent resource where this phrase set will be created. Format:
132+
// Required. The parent resource where this phrase set will be created.
133+
// Format:
129134
//
130135
// `projects/{project}/locations/{location}/phraseSets`
131136
//
@@ -248,7 +253,8 @@ message DeletePhraseSetRequest {
248253

249254
// Message sent by the client for the `CreateCustomClass` method.
250255
message CreateCustomClassRequest {
251-
// Required. The parent resource where this custom class will be created. Format:
256+
// Required. The parent resource where this custom class will be created.
257+
// Format:
252258
//
253259
// `projects/{project}/locations/{location}/customClasses`
254260
//

google/cloud/speech/v1p1beta1/resource.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ message PhraseSet {
8282
// Speech-to-Text supports three locations: `global`, `us` (US North America),
8383
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
8484
// endpoint, use the `global` location. To specify a region, use a
85-
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
86-
// `eu` location value.
85+
// [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
86+
// with matching `us` or `eu` location value.
8787
message Phrase {
8888
// The phrase itself.
8989
string value = 1;

0 commit comments

Comments
 (0)