Skip to content

Commit 6ddf897

Browse files
feat: [google-cloud-speech] expand the set of supported explicit audio encodings (#13380)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: expand the set of supported explicit audio encodings docs: updated ExplicitDecodingConfig documentation to reflect changes related to newly supported encodings END_COMMIT_OVERRIDE PiperOrigin-RevId: 708316885 Source-Link: googleapis/googleapis@bf2a7ca Source-Link: googleapis/googleapis-gen@4989c73 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNDk4OWM3MzQ2OWZlYTI4ZTUxODFlOTYxYTgzYWZmZmY3MGI4NDNiNCJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5db8939 commit 6ddf897

File tree

8 files changed

+57
-36
lines changed

8 files changed

+57
-36
lines changed

packages/google-cloud-speech/google/cloud/speech/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.29.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-speech/google/cloud/speech_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.29.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-speech/google/cloud/speech_v1p1beta1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.29.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-speech/google/cloud/speech_v2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.29.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-speech/google/cloud/speech_v2/types/cloud_speech.py

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -809,29 +809,21 @@ class ExplicitDecodingConfig(proto.Message):
809809
Required. Encoding of the audio data sent for
810810
recognition.
811811
sample_rate_hertz (int):
812-
Sample rate in Hertz of the audio data sent for recognition.
813-
Valid values are: 8000-48000. 16000 is optimal. For best
814-
results, set the sampling rate of the audio source to 16000
815-
Hz. If that's not possible, use the native sample rate of
816-
the audio source (instead of re-sampling). Supported for the
817-
following encodings:
818-
819-
- LINEAR16: Headerless 16-bit signed little-endian PCM
820-
samples.
821-
822-
- MULAW: Headerless 8-bit companded mulaw samples.
823-
824-
- ALAW: Headerless 8-bit companded alaw samples.
812+
Optional. Sample rate in Hertz of the audio
813+
data sent for recognition. Valid values are:
814+
8000-48000. 16000 is optimal. For best results,
815+
set the sampling rate of the audio source to
816+
16000 Hz. If that's not possible, use the native
817+
sample rate of the audio source (instead of
818+
re-sampling). Note that this field is marked as
819+
OPTIONAL for backward compatibility reasons. It
820+
is (and has always been) effectively REQUIRED.
825821
audio_channel_count (int):
826-
Number of channels present in the audio data sent for
827-
recognition. Supported for the following encodings:
828-
829-
- LINEAR16: Headerless 16-bit signed little-endian PCM
830-
samples.
831-
832-
- MULAW: Headerless 8-bit companded mulaw samples.
833-
834-
- ALAW: Headerless 8-bit companded alaw samples.
822+
Optional. Number of channels present in the
823+
audio data sent for recognition. Note that this
824+
field is marked as OPTIONAL for backward
825+
compatibility reasons. It is (and has always
826+
been) effectively REQUIRED.
835827
836828
The maximum allowed value is 8.
837829
"""
@@ -849,11 +841,40 @@ class AudioEncoding(proto.Enum):
849841
Headerless 8-bit companded mulaw samples.
850842
ALAW (3):
851843
Headerless 8-bit companded alaw samples.
844+
AMR (4):
845+
AMR frames with an rfc4867.5 header.
846+
AMR_WB (5):
847+
AMR-WB frames with an rfc4867.5 header.
848+
FLAC (6):
849+
FLAC frames in the "native FLAC" container
850+
format.
851+
MP3 (7):
852+
MPEG audio frames with optional (ignored) ID3
853+
metadata.
854+
OGG_OPUS (8):
855+
Opus audio frames in an Ogg container.
856+
WEBM_OPUS (9):
857+
Opus audio frames in a WebM container.
858+
MP4_AAC (10):
859+
AAC audio frames in an MP4 container.
860+
M4A_AAC (11):
861+
AAC audio frames in an M4A container.
862+
MOV_AAC (12):
863+
AAC audio frames in an MOV container.
852864
"""
853865
AUDIO_ENCODING_UNSPECIFIED = 0
854866
LINEAR16 = 1
855867
MULAW = 2
856868
ALAW = 3
869+
AMR = 4
870+
AMR_WB = 5
871+
FLAC = 6
872+
MP3 = 7
873+
OGG_OPUS = 8
874+
WEBM_OPUS = 9
875+
MP4_AAC = 10
876+
M4A_AAC = 11
877+
MOV_AAC = 12
857878

858879
encoding: AudioEncoding = proto.Field(
859880
proto.ENUM,
@@ -1871,16 +1892,16 @@ class OutputFormatConfig(proto.Message):
18711892
native (google.cloud.speech_v2.types.NativeOutputFileFormatConfig):
18721893
Configuration for the native output format.
18731894
If this field is set or if no other output
1874-
format field is set then transcripts will be
1895+
format field is set, then transcripts will be
18751896
written to the sink in the native format.
18761897
vtt (google.cloud.speech_v2.types.VttOutputFileFormatConfig):
1877-
Configuration for the vtt output format. If
1878-
this field is set then transcripts will be
1879-
written to the sink in the vtt format.
1898+
Configuration for the VTT output format. If
1899+
this field is set, then transcripts will be
1900+
written to the sink in the VTT format.
18801901
srt (google.cloud.speech_v2.types.SrtOutputFileFormatConfig):
1881-
Configuration for the srt output format. If
1882-
this field is set then transcripts will be
1883-
written to the sink in the srt format.
1902+
Configuration for the SRT output format. If
1903+
this field is set, then transcripts will be
1904+
written to the sink in the SRT format.
18841905
"""
18851906

18861907
native: "NativeOutputFileFormatConfig" = proto.Field(

packages/google-cloud-speech/samples/generated_samples/snippet_metadata_google.cloud.speech.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-speech",
11-
"version": "2.29.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-speech/samples/generated_samples/snippet_metadata_google.cloud.speech.v1p1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-speech",
11-
"version": "2.29.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-speech/samples/generated_samples/snippet_metadata_google.cloud.speech.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-speech",
11-
"version": "2.29.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)