Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 856259c

Browse filesBrowse files
feat: add output_config request field (#252)
* feat: add output_config request field Committer: @cherba PiperOrigin-RevId: 397621106 Source-Link: googleapis/googleapis@1872f45 Source-Link: googleapis/googleapis-gen@fd4bb9f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmQ0YmI5ZjNmY2M2YjdiZjQ5ODgwOGM0NDNlYWU5YmYwZDQ0NDdkZiJ9 * 🦉 Updates from OwlBot 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>
1 parent 245b74b commit 856259c
Copy full SHA for 856259c

File tree

Expand file treeCollapse file tree

5 files changed

+29
-1
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+29
-1
lines changed

‎packages/google-cloud-python-speech/google/cloud/speech/__init__.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/google/cloud/speech/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from google.cloud.speech_v1.types.cloud_speech import StreamingRecognitionResult
3434
from google.cloud.speech_v1.types.cloud_speech import StreamingRecognizeRequest
3535
from google.cloud.speech_v1.types.cloud_speech import StreamingRecognizeResponse
36+
from google.cloud.speech_v1.types.cloud_speech import TranscriptOutputConfig
3637
from google.cloud.speech_v1.types.cloud_speech import WordInfo
3738

3839
__all__ = (
@@ -54,5 +55,6 @@
5455
"StreamingRecognitionResult",
5556
"StreamingRecognizeRequest",
5657
"StreamingRecognizeResponse",
58+
"TranscriptOutputConfig",
5759
"WordInfo",
5860
)

‎packages/google-cloud-python-speech/google/cloud/speech_v1/__init__.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/google/cloud/speech_v1/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from .types.cloud_speech import StreamingRecognitionResult
3434
from .types.cloud_speech import StreamingRecognizeRequest
3535
from .types.cloud_speech import StreamingRecognizeResponse
36+
from .types.cloud_speech import TranscriptOutputConfig
3637
from .types.cloud_speech import WordInfo
3738

3839
from google.cloud.speech_v1.helpers import SpeechHelpers
@@ -61,5 +62,6 @@ class SpeechClient(SpeechHelpers, SpeechClient):
6162
"StreamingRecognitionResult",
6263
"StreamingRecognizeRequest",
6364
"StreamingRecognizeResponse",
65+
"TranscriptOutputConfig",
6466
"WordInfo",
6567
)

‎packages/google-cloud-python-speech/google/cloud/speech_v1/types/__init__.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/google/cloud/speech_v1/types/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
StreamingRecognitionResult,
3131
StreamingRecognizeRequest,
3232
StreamingRecognizeResponse,
33+
TranscriptOutputConfig,
3334
WordInfo,
3435
)
3536

@@ -50,5 +51,6 @@
5051
"StreamingRecognitionResult",
5152
"StreamingRecognizeRequest",
5253
"StreamingRecognizeResponse",
54+
"TranscriptOutputConfig",
5355
"WordInfo",
5456
)

‎packages/google-cloud-python-speech/google/cloud/speech_v1/types/cloud_speech.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/google/cloud/speech_v1/types/cloud_speech.py
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
manifest={
2626
"RecognizeRequest",
2727
"LongRunningRecognizeRequest",
28+
"TranscriptOutputConfig",
2829
"StreamingRecognizeRequest",
2930
"StreamingRecognitionConfig",
3031
"RecognitionConfig",
@@ -72,10 +73,31 @@ class LongRunningRecognizeRequest(proto.Message):
7273
request.
7374
audio (google.cloud.speech_v1.types.RecognitionAudio):
7475
Required. The audio data to be recognized.
76+
output_config (google.cloud.speech_v1.types.TranscriptOutputConfig):
77+
Optional. Specifies an optional destination
78+
for the recognition results.
7579
"""
7680

7781
config = proto.Field(proto.MESSAGE, number=1, message="RecognitionConfig",)
7882
audio = proto.Field(proto.MESSAGE, number=2, message="RecognitionAudio",)
83+
output_config = proto.Field(
84+
proto.MESSAGE, number=4, message="TranscriptOutputConfig",
85+
)
86+
87+
88+
class TranscriptOutputConfig(proto.Message):
89+
r"""Specifies an optional destination for the recognition
90+
results.
91+
92+
Attributes:
93+
gcs_uri (str):
94+
Specifies a Cloud Storage URI for the recognition results.
95+
Must be specified in the format:
96+
``gs://bucket_name/object_name``, and the bucket must
97+
already exist.
98+
"""
99+
100+
gcs_uri = proto.Field(proto.STRING, number=1, oneof="output_type",)
79101

80102

81103
class StreamingRecognizeRequest(proto.Message):

‎packages/google-cloud-python-speech/scripts/fixup_speech_v1_keywords.py

Copy file name to clipboardExpand all lines: packages/google-cloud-python-speech/scripts/fixup_speech_v1_keywords.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def partition(
3939
class speechCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'long_running_recognize': ('config', 'audio', ),
42+
'long_running_recognize': ('config', 'audio', 'output_config', ),
4343
'recognize': ('config', 'audio', ),
4444
'streaming_recognize': ('streaming_config', 'audio_content', ),
4545
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.