Skip to content

Commit 2c37fa1

Browse files
feat: [google-cloud-texttospeech] Add prompt to SynthesisInput (#14358)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 802731785 Source-Link: googleapis/googleapis@c866721 Source-Link: googleapis/googleapis-gen@124a94d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiMTI0YTk0ZDU2NmVlNzNjMWE4ODM3NjAwNjBkYTdlZGVmYmVkYjY2ZCJ9 BEGIN_NESTED_COMMIT feat: [google-cloud-texttospeech] Add string value prompt to SynthesisInput PiperOrigin-RevId: 802688528 Source-Link: googleapis/googleapis@acdae9a Source-Link: googleapis/googleapis-gen@2118e2f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiMjExOGUyZjE0MDNjMTQ3ZjM5YmQyYjlhMjFkZTY3MzA4MzkzYTdkNyJ9 END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 0370ed1 commit 2c37fa1

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ class SynthesisInput(proto.Message):
441441
Only applicable for multi-speaker synthesis.
442442
443443
This field is a member of `oneof`_ ``input_source``.
444+
prompt (str):
445+
This system instruction is supported only for
446+
controllable/promptable voice models. If this
447+
system instruction is used, we pass the unedited
448+
text to Gemini-TTS. Otherwise, a default system
449+
instruction is used. AI Studio calls this system
450+
instruction, Style Instructions.
451+
452+
This field is a member of `oneof`_ ``_prompt``.
444453
custom_pronunciations (google.cloud.texttospeech_v1.types.CustomPronunciations):
445454
Optional. The pronunciation customizations
446455
are applied to the input. If this is set, the
@@ -478,6 +487,11 @@ class SynthesisInput(proto.Message):
478487
oneof="input_source",
479488
message="MultiSpeakerMarkup",
480489
)
490+
prompt: str = proto.Field(
491+
proto.STRING,
492+
number=6,
493+
optional=True,
494+
)
481495
custom_pronunciations: "CustomPronunciations" = proto.Field(
482496
proto.MESSAGE,
483497
number=3,

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,15 @@ class SynthesisInput(proto.Message):
468468
Only applicable for multi-speaker synthesis.
469469
470470
This field is a member of `oneof`_ ``input_source``.
471+
prompt (str):
472+
This system instruction is supported only for
473+
controllable/promptable voice models. If this
474+
system instruction is used, we pass the unedited
475+
text to Gemini-TTS. Otherwise, a default system
476+
instruction is used. AI Studio calls this system
477+
instruction, Style Instructions.
478+
479+
This field is a member of `oneof`_ ``_prompt``.
471480
custom_pronunciations (google.cloud.texttospeech_v1beta1.types.CustomPronunciations):
472481
Optional. The pronunciation customizations
473482
are applied to the input. If this is set, the
@@ -505,6 +514,11 @@ class SynthesisInput(proto.Message):
505514
oneof="input_source",
506515
message="MultiSpeakerMarkup",
507516
)
517+
prompt: str = proto.Field(
518+
proto.STRING,
519+
number=6,
520+
optional=True,
521+
)
508522
custom_pronunciations: "CustomPronunciations" = proto.Field(
509523
proto.MESSAGE,
510524
number=3,

0 commit comments

Comments
 (0)