From 8bbd38014fe796b30f4b12ae9432d3a05c130063 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 30 Mar 2021 08:38:05 -0700 Subject: [PATCH] feat:Add ALAW support on client library and improve the ListVoiceRequest message's documentation (#113) PiperOrigin-RevId: 365608171 Source-Author: Google APIs Source-Date: Mon Mar 29 10:35:36 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 45445f476c39de13be89a3c5a45b67c7a2320fcf Source-Link: https://github.com/googleapis/googleapis/commit/45445f476c39de13be89a3c5a45b67c7a2320fcf --- .../services/text_to_speech/async_client.py | 7 ++++--- .../services/text_to_speech/client.py | 7 ++++--- .../cloud/texttospeech_v1beta1/types/cloud_tts.py | 14 ++++++++------ synth.metadata | 6 +++--- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py b/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py index b505fbbc..d2c2cd90 100644 --- a/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py +++ b/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py @@ -179,14 +179,15 @@ async def list_voices( language_code (:class:`str`): Optional. Recommended. `BCP-47 `__ - language tag. If specified, the ListVoices call will + language tag. If not specified, the API will return all + supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. E.g. when specifying "en-NZ", you will - get supported "en-\*" voices; when specifying "no", you + get supported "en-NZ" voices; when specifying "no", you will get supported "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh" will also get supported "cmn-\*" voices; specifying "zh-hk" will also - get supported "yue-\*" voices. + get supported "yue-hk" voices. This corresponds to the ``language_code`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py b/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py index 4f3f6a40..3942dfcf 100644 --- a/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py +++ b/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py @@ -342,14 +342,15 @@ def list_voices( language_code (str): Optional. Recommended. `BCP-47 `__ - language tag. If specified, the ListVoices call will + language tag. If not specified, the API will return all + supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. E.g. when specifying "en-NZ", you will - get supported "en-\*" voices; when specifying "no", you + get supported "en-NZ" voices; when specifying "no", you will get supported "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh" will also get supported "cmn-\*" voices; specifying "zh-hk" will also - get supported "yue-\*" voices. + get supported "yue-hk" voices. This corresponds to the ``language_code`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/texttospeech_v1beta1/types/cloud_tts.py b/google/cloud/texttospeech_v1beta1/types/cloud_tts.py index b4a46327..c49de4a4 100644 --- a/google/cloud/texttospeech_v1beta1/types/cloud_tts.py +++ b/google/cloud/texttospeech_v1beta1/types/cloud_tts.py @@ -56,6 +56,7 @@ class AudioEncoding(proto.Enum): MP3_64_KBPS = 4 OGG_OPUS = 3 MULAW = 5 + ALAW = 6 class ListVoicesRequest(proto.Message): @@ -66,13 +67,14 @@ class ListVoicesRequest(proto.Message): language_code (str): Optional. Recommended. `BCP-47 `__ - language tag. If specified, the ListVoices call will only - return voices that can be used to synthesize this + language tag. If not specified, the API will return all + supported voices. If specified, the ListVoices call will + only return voices that can be used to synthesize this language_code. E.g. when specifying "en-NZ", you will get - supported "en-\*" voices; when specifying "no", you will get + supported "en-NZ" voices; when specifying "no", you will get supported "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh" will also get supported "cmn-\*" - voices; specifying "zh-hk" will also get supported "yue-\*" + voices; specifying "zh-hk" will also get supported "yue-hk" voices. """ @@ -132,8 +134,8 @@ class SynthesizeSpeechRequest(proto.Message): Required. The configuration of the synthesized audio. enable_time_pointing (Sequence[google.cloud.texttospeech_v1beta1.types.SynthesizeSpeechRequest.TimepointType]): - Whether and what timepoints should be - returned in the response. + Whether and what timepoints are returned in + the response. """ class TimepointType(proto.Enum): diff --git a/synth.metadata b/synth.metadata index f2456041..dad1e68d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-texttospeech.git", - "sha": "dc07688434edf0774a8b19d2c6250eddc942b60a" + "sha": "3d6431c1b978262ecd353746d45c62cfcab0c431" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "149a3a84c29c9b8189576c7442ccb6dcf6a8f95b", - "internalRef": "364411656" + "sha": "45445f476c39de13be89a3c5a45b67c7a2320fcf", + "internalRef": "365608171" } }, {