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

Commit ef48274

Browse files
docs: Add documentation for enums (#256)
* docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: googleapis/googleapis@a391fd1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 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>
1 parent d6916ea commit ef48274

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

google/cloud/mediatranslation_v1beta1/services/speech_translation_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def request_generator():
519519
# Done; return the response.
520520
return response
521521

522-
def __enter__(self):
522+
def __enter__(self) -> "SpeechTranslationServiceClient":
523523
return self
524524

525525
def __exit__(self, type, value, traceback):

google/cloud/mediatranslation_v1beta1/types/media_translation.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,26 @@ class StreamingTranslateSpeechResponse(proto.Message):
277277
"""
278278

279279
class SpeechEventType(proto.Enum):
280-
r"""Indicates the type of speech event."""
280+
r"""Indicates the type of speech event.
281+
282+
Values:
283+
SPEECH_EVENT_TYPE_UNSPECIFIED (0):
284+
No speech event specified.
285+
END_OF_SINGLE_UTTERANCE (1):
286+
This event indicates that the server has detected the end of
287+
the user's speech utterance and expects no additional
288+
speech. Therefore, the server will not process additional
289+
audio (although it may subsequently return additional
290+
results). When the client receives 'END_OF_SINGLE_UTTERANCE'
291+
event, the client should stop sending the requests. However,
292+
clients should keep receiving remaining responses until the
293+
stream is terminated. To construct the complete sentence in
294+
a streaming way, one should override (if 'is_final' of
295+
previous response is false), or append (if 'is_final' of
296+
previous response is true). This event is only sent if
297+
``single_utterance`` was set to ``true``, and is not used
298+
otherwise.
299+
"""
281300
SPEECH_EVENT_TYPE_UNSPECIFIED = 0
282301
END_OF_SINGLE_UTTERANCE = 1
283302

samples/generated_samples/snippet_metadata_google.cloud.mediatranslation.v1beta1.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-media-translation",
11-
"version": "0.11.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)