Skip to content

Commit

Permalink
docs: [speech] Clarified boost usage (#9032)
Browse files Browse the repository at this point in the history
* docs: Clarify boost usage in Reference

PiperOrigin-RevId: 504332057

Source-Link: googleapis/googleapis@13dd16c

Source-Link: https://github.com/googleapis/googleapis-gen/commit/75a668a05f5e438fbc0105c85433ae181ef37ec0
Copy-Tag: eyJwIjoiamF2YS1zcGVlY2gvLk93bEJvdC55YW1sIiwiaCI6Ijc1YTY2OGEwNWY1ZTQzOGZiYzAxMDVjODU0MzNhZTE4MWVmMzdlYzAifQ==

* 🦉 Updates from OwlBot post-processor

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

* docs: Clarified boost usage

PiperOrigin-RevId: 506405333

Source-Link: googleapis/googleapis@c8a382b

Source-Link: https://github.com/googleapis/googleapis-gen/commit/655941e193fa93cbb2eac7ad5cd2b943b3cf287e
Copy-Tag: eyJwIjoiamF2YS1zcGVlY2gvLk93bEJvdC55YW1sIiwiaCI6IjY1NTk0MWUxOTNmYTkzY2JiMmVhYzdhZDVjZDJiOTQzYjNjZjI4N2UifQ==

* 🦉 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 Feb 2, 2023
1 parent 2bf4ad6 commit fd273d6
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 111 deletions.
6 changes: 3 additions & 3 deletions java-speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-speech</artifactId>
<version>4.3.0</version>
<version>4.4.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-speech:4.3.0'
implementation 'com.google.cloud:google-cloud-speech:4.4.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "4.3.0"
libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "4.4.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -107,7 +108,8 @@ public java.lang.String getParent() {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -651,7 +653,8 @@ public Builder mergeFrom(
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -681,7 +684,8 @@ public java.lang.String getParent() {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -711,7 +715,8 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -740,7 +745,8 @@ public Builder setParent(java.lang.String value) {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand All @@ -765,7 +771,8 @@ public Builder clearParent() {
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public interface CreateCustomClassRequestOrBuilder
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand All @@ -47,7 +48,8 @@ public interface CreateCustomClassRequestOrBuilder
*
*
* <pre>
* Required. The parent resource where this custom class will be created. Format:
* Required. The parent resource where this custom class will be created.
* Format:
* `projects/{project}/locations/{location}/customClasses`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -107,7 +108,8 @@ public java.lang.String getParent() {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -650,7 +652,8 @@ public Builder mergeFrom(
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -680,7 +683,8 @@ public java.lang.String getParent() {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -710,7 +714,8 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down Expand Up @@ -739,7 +744,8 @@ public Builder setParent(java.lang.String value) {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand All @@ -764,7 +770,8 @@ public Builder clearParent() {
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public interface CreatePhraseSetRequestOrBuilder
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand All @@ -47,7 +48,8 @@ public interface CreatePhraseSetRequestOrBuilder
*
*
* <pre>
* Required. The parent resource where this phrase set will be created. Format:
* Required. The parent resource where this phrase set will be created.
* Format:
* `projects/{project}/locations/{location}/phraseSets`
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ public interface PhraseOrBuilder
* boost will simply be ignored. Though `boost` can accept a wide range of
* positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 2;</code>
Expand Down Expand Up @@ -145,8 +145,8 @@ public interface PhraseOrBuilder
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
* endpoint, use the `global` location. To specify a region, use a
* [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
* `eu` location value.
* [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
* with matching `us` or `eu` location value.
* </pre>
*
* Protobuf type {@code google.cloud.speech.v1.PhraseSet.Phrase}
Expand Down Expand Up @@ -255,8 +255,8 @@ public com.google.protobuf.ByteString getValueBytes() {
* boost will simply be ignored. Though `boost` can accept a wide range of
* positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 2;</code>
Expand Down Expand Up @@ -463,8 +463,8 @@ protected Builder newBuilderForType(
* Speech-to-Text supports three locations: `global`, `us` (US North America),
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
* endpoint, use the `global` location. To specify a region, use a
* [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
* `eu` location value.
* [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
* with matching `us` or `eu` location value.
* </pre>
*
* Protobuf type {@code google.cloud.speech.v1.PhraseSet.Phrase}
Expand Down Expand Up @@ -776,8 +776,8 @@ public Builder setValueBytes(com.google.protobuf.ByteString value) {
* boost will simply be ignored. Though `boost` can accept a wide range of
* positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 2;</code>
Expand All @@ -799,8 +799,8 @@ public float getBoost() {
* boost will simply be ignored. Though `boost` can accept a wide range of
* positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 2;</code>
Expand All @@ -826,8 +826,8 @@ public Builder setBoost(float value) {
* boost will simply be ignored. Though `boost` can accept a wide range of
* positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 2;</code>
Expand Down Expand Up @@ -1040,8 +1040,8 @@ public com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(
* enabled, so negative boost will simply be ignored. Though `boost` can
* accept a wide range of positive values, most use cases are best served with
* values between 0 (exclusive) and 20. We recommend using a binary search
* approach to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* approach to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 4;</code>
Expand Down Expand Up @@ -1953,8 +1953,8 @@ public com.google.cloud.speech.v1.PhraseSet.Phrase.Builder addPhrasesBuilder(int
* enabled, so negative boost will simply be ignored. Though `boost` can
* accept a wide range of positive values, most use cases are best served with
* values between 0 (exclusive) and 20. We recommend using a binary search
* approach to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* approach to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 4;</code>
Expand All @@ -1976,8 +1976,8 @@ public float getBoost() {
* enabled, so negative boost will simply be ignored. Though `boost` can
* accept a wide range of positive values, most use cases are best served with
* values between 0 (exclusive) and 20. We recommend using a binary search
* approach to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* approach to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 4;</code>
Expand All @@ -2003,8 +2003,8 @@ public Builder setBoost(float value) {
* enabled, so negative boost will simply be ignored. Though `boost` can
* accept a wide range of positive values, most use cases are best served with
* values between 0 (exclusive) and 20. We recommend using a binary search
* approach to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* approach to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 4;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public interface PhraseSetOrBuilder
* enabled, so negative boost will simply be ignored. Though `boost` can
* accept a wide range of positive values, most use cases are best served with
* values between 0 (exclusive) and 20. We recommend using a binary search
* approach to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
* approach to finding the optimal value for your use case as well as adding
* phrases both with and without boost to your requests.
* </pre>
*
* <code>float boost = 4;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ option objc_class_prefix = "GCS";
// Service that implements Google Cloud Speech Adaptation API.
service Adaptation {
option (google.api.default_host) = "speech.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

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

// Get a custom class.
Expand All @@ -98,7 +100,8 @@ service Adaptation {
}

// List custom classes.
rpc ListCustomClasses(ListCustomClassesRequest) returns (ListCustomClassesResponse) {
rpc ListCustomClasses(ListCustomClassesRequest)
returns (ListCustomClassesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/customClasses"
};
Expand All @@ -115,7 +118,8 @@ service Adaptation {
}

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

// Message sent by the client for the `CreatePhraseSet` method.
message CreatePhraseSetRequest {
// Required. The parent resource where this phrase set will be created. Format:
// Required. The parent resource where this phrase set will be created.
// Format:
//
// `projects/{project}/locations/{location}/phraseSets`
//
Expand Down Expand Up @@ -248,7 +253,8 @@ message DeletePhraseSetRequest {

// Message sent by the client for the `CreateCustomClass` method.
message CreateCustomClassRequest {
// Required. The parent resource where this custom class will be created. Format:
// Required. The parent resource where this custom class will be created.
// Format:
//
// `projects/{project}/locations/{location}/customClasses`
//
Expand Down
Loading

0 comments on commit fd273d6

Please sign in to comment.