Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [speech] Voice Activity Detection: adding speech event time and speech event type #9154

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4.0</version>
<version>4.6.0</version>
</dependency>
```

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

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

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

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

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void streamingRecognizeTest() throws Exception {
StreamingRecognizeResponse.newBuilder()
.setError(Status.newBuilder().build())
.addAllResults(new ArrayList<StreamingRecognitionResult>())
.setSpeechEventTime(Duration.newBuilder().build())
.setTotalBilledTime(Duration.newBuilder().build())
.setSpeechAdaptationInfo(SpeechAdaptationInfo.newBuilder().build())
.setRequestId(37109963)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public void streamingRecognizeTest() throws Exception {
StreamingRecognizeResponse.newBuilder()
.setError(Status.newBuilder().build())
.addAllResults(new ArrayList<StreamingRecognitionResult>())
.setSpeechEventTime(Duration.newBuilder().build())
.setTotalBilledTime(Duration.newBuilder().build())
.setSpeechAdaptationInfo(SpeechAdaptationInfo.newBuilder().build())
.setRequestId(37109963)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -216,8 +216,8 @@ public java.lang.String getUri() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand Down Expand Up @@ -1090,8 +1090,8 @@ public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -1113,8 +1113,8 @@ public java.lang.String getUri() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -1136,8 +1136,8 @@ public com.google.protobuf.ByteString getUriBytes() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -1158,8 +1158,8 @@ public Builder setUri(java.lang.String value) {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -1176,8 +1176,8 @@ public Builder clearUri() {
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public interface LongRunningRecognizeMetadataOrBuilder
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand All @@ -124,8 +124,8 @@ public interface LongRunningRecognizeMetadataOrBuilder
*
*
* <pre>
* Output only. The URI of the audio file being transcribed. Empty if the audio was sent
* as byte content.
* Output only. The URI of the audio file being transcribed. Empty if the
* audio was sent as byte content.
* </pre>
*
* <code>string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* <pre>
* Contains audio data in the encoding specified in the `RecognitionConfig`.
* Either `content` or `uri` must be supplied. Supplying both or neither
* returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
* [content limits](https://cloud.google.com/speech-to-text/quotas#content).
* returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
* See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
* </pre>
*
* Protobuf type {@code google.cloud.speech.v1.RecognitionAudio}
Expand Down Expand Up @@ -164,8 +164,9 @@ public com.google.protobuf.ByteString getContent() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -184,8 +185,9 @@ public boolean hasUri() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down Expand Up @@ -217,8 +219,9 @@ public java.lang.String getUri() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down Expand Up @@ -435,8 +438,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
* <pre>
* Contains audio data in the encoding specified in the `RecognitionConfig`.
* Either `content` or `uri` must be supplied. Supplying both or neither
* returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
* [content limits](https://cloud.google.com/speech-to-text/quotas#content).
* returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
* See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
* </pre>
*
* Protobuf type {@code google.cloud.speech.v1.RecognitionAudio}
Expand Down Expand Up @@ -741,8 +744,9 @@ public Builder clearContent() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -762,8 +766,9 @@ public boolean hasUri() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down Expand Up @@ -796,8 +801,9 @@ public java.lang.String getUri() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down Expand Up @@ -830,8 +836,9 @@ public com.google.protobuf.ByteString getUriBytes() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -857,8 +864,9 @@ public Builder setUri(java.lang.String value) {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -882,8 +890,9 @@ public Builder clearUri() {
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ public interface RecognitionAudioOrBuilder
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -79,8 +80,9 @@ public interface RecognitionAudioOrBuilder
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand All @@ -97,8 +99,9 @@ public interface RecognitionAudioOrBuilder
* Currently, only Google Cloud Storage URIs are
* supported, which must be specified in the following format:
* `gs://bucket_name/object_name` (other URI formats return
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
* [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
* [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
* For more information, see [Request
* URIs](https://cloud.google.com/storage/docs/reference-uris).
* </pre>
*
* <code>string uri = 2;</code>
Expand Down
Loading