Skip to content

Commit 3b97314

Browse files
gcf-owl-bot[bot]vchudnov-gparthea
authored
feat: [google-cloud-texttospeech] Add brand voice lite (#13178)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 687058189 Source-Link: googleapis/googleapis@5ebb5c1 Source-Link: googleapis/googleapis-gen@293badf Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiMjkzYmFkZmQ2MTQ1OTdiYTFkZDE1MTZkYjU4MDk0NTU3ZjdiNGM3ZSJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 76e529c commit 3b97314

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
SynthesizeSpeechResponse,
4343
Timepoint,
4444
Voice,
45+
VoiceCloneParams,
4546
VoiceSelectionParams,
4647
)
4748
from .types.cloud_tts_lrs import (
@@ -76,5 +77,6 @@
7677
"TextToSpeechLongAudioSynthesizeClient",
7778
"Timepoint",
7879
"Voice",
80+
"VoiceCloneParams",
7981
"VoiceSelectionParams",
8082
)

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
SynthesizeSpeechResponse,
3333
Timepoint,
3434
Voice,
35+
VoiceCloneParams,
3536
VoiceSelectionParams,
3637
)
3738
from .cloud_tts_lrs import (
@@ -57,6 +58,7 @@
5758
"SynthesizeSpeechResponse",
5859
"Timepoint",
5960
"Voice",
61+
"VoiceCloneParams",
6062
"VoiceSelectionParams",
6163
"AudioEncoding",
6264
"SsmlVoiceGender",

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/types/cloud_tts.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"VoiceSelectionParams",
3636
"AudioConfig",
3737
"CustomVoiceParams",
38+
"VoiceCloneParams",
3839
"SynthesizeSpeechResponse",
3940
"Timepoint",
4041
"StreamingSynthesizeConfig",
@@ -450,6 +451,10 @@ class VoiceSelectionParams(proto.Message):
450451
The configuration for a custom voice. If
451452
[CustomVoiceParams.model] is set, the service will choose
452453
the custom voice matching the specified configuration.
454+
voice_clone (google.cloud.texttospeech_v1beta1.types.VoiceCloneParams):
455+
Optional. The configuration for a voice clone. If
456+
[VoiceCloneParams.voice_clone_key] is set, the service will
457+
choose the voice clone matching the specified configuration.
453458
"""
454459

455460
language_code: str = proto.Field(
@@ -470,6 +475,11 @@ class VoiceSelectionParams(proto.Message):
470475
number=4,
471476
message="CustomVoiceParams",
472477
)
478+
voice_clone: "VoiceCloneParams" = proto.Field(
479+
proto.MESSAGE,
480+
number=5,
481+
message="VoiceCloneParams",
482+
)
473483

474484

475485
class AudioConfig(proto.Message):
@@ -592,6 +602,20 @@ class ReportedUsage(proto.Enum):
592602
)
593603

594604

605+
class VoiceCloneParams(proto.Message):
606+
r"""The configuration of Voice Clone feature.
607+
608+
Attributes:
609+
voice_cloning_key (str):
610+
Required. Created by GenerateVoiceCloningKey.
611+
"""
612+
613+
voice_cloning_key: str = proto.Field(
614+
proto.STRING,
615+
number=1,
616+
)
617+
618+
595619
class SynthesizeSpeechResponse(proto.Message):
596620
r"""The message returned to the client by the ``SynthesizeSpeech``
597621
method.

0 commit comments

Comments
 (0)