Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat: update v1 proto #221

Merged
merged 2 commits into from
Nov 16, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,7 @@ async def list_voices(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_voices,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -319,17 +309,7 @@ async def synthesize_speech(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.synthesize_speech,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,34 +122,10 @@ def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
self.list_voices: gapic_v1.method.wrap_method(
self.list_voices,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
self.list_voices, default_timeout=None, client_info=client_info,
),
self.synthesize_speech: gapic_v1.method.wrap_method(
self.synthesize_speech,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
self.synthesize_speech, default_timeout=None, client_info=client_info,
),
}

Expand Down
2 changes: 2 additions & 0 deletions google/cloud/texttospeech_v1/types/cloud_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class AudioEncoding(proto.Enum):
LINEAR16 = 1
MP3 = 2
OGG_OPUS = 3
MULAW = 5
ALAW = 6


class ListVoicesRequest(proto.Message):
Expand Down