Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

Commit e496559

Browse files
feat: add webm opus support (#500)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/c65c7773-dbef-42eb-b70e-47092f05bd1b/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 370523741 Source-Link: googleapis/googleapis@36a84fe
1 parent 4530ef9 commit e496559

File tree

5 files changed

+145
-111
lines changed

5 files changed

+145
-111
lines changed

proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,19 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
435435
* <code>MP3 = 8;</code>
436436
*/
437437
MP3(8),
438+
/**
439+
*
440+
*
441+
* <pre>
442+
* Opus encoded audio frames in WebM container
443+
* ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
444+
* only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
445+
* 12000, 16000, 24000, or 48000.
446+
* </pre>
447+
*
448+
* <code>WEBM_OPUS = 9;</code>
449+
*/
450+
WEBM_OPUS(9),
438451
UNRECOGNIZED(-1),
439452
;
440453

@@ -550,6 +563,19 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
550563
* <code>MP3 = 8;</code>
551564
*/
552565
public static final int MP3_VALUE = 8;
566+
/**
567+
*
568+
*
569+
* <pre>
570+
* Opus encoded audio frames in WebM container
571+
* ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
572+
* only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
573+
* 12000, 16000, 24000, or 48000.
574+
* </pre>
575+
*
576+
* <code>WEBM_OPUS = 9;</code>
577+
*/
578+
public static final int WEBM_OPUS_VALUE = 9;
553579

554580
public final int getNumber() {
555581
if (this == UNRECOGNIZED) {
@@ -593,6 +619,8 @@ public static AudioEncoding forNumber(int value) {
593619
return SPEEX_WITH_HEADER_BYTE;
594620
case 8:
595621
return MP3;
622+
case 9:
623+
return WEBM_OPUS;
596624
default:
597625
return null;
598626
}
@@ -1496,7 +1524,7 @@ public com.google.cloud.speech.v1p1beta1.RecognitionMetadataOrBuilder getMetadat
14961524
* &lt;/tr&gt;
14971525
* &lt;tr&gt;
14981526
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
1499-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
1527+
* &lt;td&gt;Best for audio that originated from video or includes multiple
15001528
* speakers. Ideally the audio is recorded at a 16khz or greater
15011529
* sampling rate. This is a premium model that costs more than the
15021530
* standard rate.&lt;/td&gt;
@@ -1550,7 +1578,7 @@ public java.lang.String getModel() {
15501578
* &lt;/tr&gt;
15511579
* &lt;tr&gt;
15521580
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
1553-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
1581+
* &lt;td&gt;Best for audio that originated from video or includes multiple
15541582
* speakers. Ideally the audio is recorded at a 16khz or greater
15551583
* sampling rate. This is a premium model that costs more than the
15561584
* standard rate.&lt;/td&gt;
@@ -5094,7 +5122,7 @@ public com.google.cloud.speech.v1p1beta1.RecognitionMetadataOrBuilder getMetadat
50945122
* &lt;/tr&gt;
50955123
* &lt;tr&gt;
50965124
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
5097-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
5125+
* &lt;td&gt;Best for audio that originated from video or includes multiple
50985126
* speakers. Ideally the audio is recorded at a 16khz or greater
50995127
* sampling rate. This is a premium model that costs more than the
51005128
* standard rate.&lt;/td&gt;
@@ -5147,7 +5175,7 @@ public java.lang.String getModel() {
51475175
* &lt;/tr&gt;
51485176
* &lt;tr&gt;
51495177
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
5150-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
5178+
* &lt;td&gt;Best for audio that originated from video or includes multiple
51515179
* speakers. Ideally the audio is recorded at a 16khz or greater
51525180
* sampling rate. This is a premium model that costs more than the
51535181
* standard rate.&lt;/td&gt;
@@ -5200,7 +5228,7 @@ public com.google.protobuf.ByteString getModelBytes() {
52005228
* &lt;/tr&gt;
52015229
* &lt;tr&gt;
52025230
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
5203-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
5231+
* &lt;td&gt;Best for audio that originated from video or includes multiple
52045232
* speakers. Ideally the audio is recorded at a 16khz or greater
52055233
* sampling rate. This is a premium model that costs more than the
52065234
* standard rate.&lt;/td&gt;
@@ -5252,7 +5280,7 @@ public Builder setModel(java.lang.String value) {
52525280
* &lt;/tr&gt;
52535281
* &lt;tr&gt;
52545282
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
5255-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
5283+
* &lt;td&gt;Best for audio that originated from video or includes multiple
52565284
* speakers. Ideally the audio is recorded at a 16khz or greater
52575285
* sampling rate. This is a premium model that costs more than the
52585286
* standard rate.&lt;/td&gt;
@@ -5300,7 +5328,7 @@ public Builder clearModel() {
53005328
* &lt;/tr&gt;
53015329
* &lt;tr&gt;
53025330
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
5303-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
5331+
* &lt;td&gt;Best for audio that originated from video or includes multiple
53045332
* speakers. Ideally the audio is recorded at a 16khz or greater
53055333
* sampling rate. This is a premium model that costs more than the
53065334
* standard rate.&lt;/td&gt;

proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ public interface RecognitionConfigOrBuilder
689689
* &lt;/tr&gt;
690690
* &lt;tr&gt;
691691
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
692-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
692+
* &lt;td&gt;Best for audio that originated from video or includes multiple
693693
* speakers. Ideally the audio is recorded at a 16khz or greater
694694
* sampling rate. This is a premium model that costs more than the
695695
* standard rate.&lt;/td&gt;
@@ -732,7 +732,7 @@ public interface RecognitionConfigOrBuilder
732732
* &lt;/tr&gt;
733733
* &lt;tr&gt;
734734
* &lt;td&gt;&lt;code&gt;video&lt;/code&gt;&lt;/td&gt;
735-
* &lt;td&gt;Best for audio that originated from from video or includes multiple
735+
* &lt;td&gt;Best for audio that originated from video or includes multiple
736736
* speakers. Ideally the audio is recorded at a 16khz or greater
737737
* sampling rate. This is a premium model that costs more than the
738738
* standard rate.&lt;/td&gt;

0 commit comments

Comments
 (0)