Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
MultispeakerPrebuiltVoice,
MultiSpeakerVoiceConfig,
SsmlVoiceGender,
StreamingAudioConfig,
StreamingSynthesisInput,
Expand Down Expand Up @@ -72,6 +74,8 @@
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"MultispeakerPrebuiltVoice",
"MultiSpeakerVoiceConfig",
"StreamingAudioConfig",
"StreamingSynthesisInput",
"StreamingSynthesizeConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.29.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
MultispeakerPrebuiltVoice,
MultiSpeakerVoiceConfig,
SsmlVoiceGender,
StreamingAudioConfig,
StreamingSynthesisInput,
Expand Down Expand Up @@ -64,6 +66,8 @@
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"MultiSpeakerVoiceConfig",
"MultispeakerPrebuiltVoice",
"SsmlVoiceGender",
"StreamingAudioConfig",
"StreamingSynthesisInput",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.29.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
ListVoicesRequest,
ListVoicesResponse,
MultiSpeakerMarkup,
MultispeakerPrebuiltVoice,
MultiSpeakerVoiceConfig,
SsmlVoiceGender,
StreamingAudioConfig,
StreamingSynthesisInput,
Expand Down Expand Up @@ -51,6 +53,8 @@
"ListVoicesRequest",
"ListVoicesResponse",
"MultiSpeakerMarkup",
"MultispeakerPrebuiltVoice",
"MultiSpeakerVoiceConfig",
"StreamingAudioConfig",
"StreamingSynthesisInput",
"StreamingSynthesizeConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"CustomPronunciationParams",
"CustomPronunciations",
"MultiSpeakerMarkup",
"MultispeakerPrebuiltVoice",
"MultiSpeakerVoiceConfig",
"SynthesisInput",
"VoiceSelectionParams",
"AudioConfig",
Expand Down Expand Up @@ -404,6 +406,53 @@ class Turn(proto.Message):
)


class MultispeakerPrebuiltVoice(proto.Message):
r"""Configuration for a single speaker in a Gemini TTS
multi-speaker setup. Enables dialogue between two speakers.

Attributes:
speaker_alias (str):
Required. The speaker alias of the voice.
This is the user-chosen speaker name that is
used in the multispeaker text input, such as
"Speaker1".
speaker_id (str):
Required. The speaker ID of the voice. See
https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options
for available values.
"""

speaker_alias: str = proto.Field(
proto.STRING,
number=1,
)
speaker_id: str = proto.Field(
proto.STRING,
number=2,
)


class MultiSpeakerVoiceConfig(proto.Message):
r"""Configuration for a multi-speaker text-to-speech setup.
Enables the use of up to two distinct voices in a single
synthesis request.

Attributes:
speaker_voice_configs (MutableSequence[google.cloud.texttospeech_v1.types.MultispeakerPrebuiltVoice]):
Required. A list of configurations for the
voices of the speakers. Exactly two speaker
voice configurations must be provided.
"""

speaker_voice_configs: MutableSequence[
"MultispeakerPrebuiltVoice"
] = proto.RepeatedField(
proto.MESSAGE,
number=2,
message="MultispeakerPrebuiltVoice",
)


class SynthesisInput(proto.Message):
r"""Contains text input to be synthesized. Either ``text`` or ``ssml``
must be supplied. Supplying both or neither returns
Expand Down Expand Up @@ -542,6 +591,11 @@ class VoiceSelectionParams(proto.Message):
Optional. The name of the model. If set, the
service will choose the model matching the
specified configuration.
multi_speaker_voice_config (google.cloud.texttospeech_v1.types.MultiSpeakerVoiceConfig):
Optional. The configuration for a Gemini
multi-speaker text-to-speech setup. Enables the
use of two distinct voices in a single synthesis
request.
"""

language_code: str = proto.Field(
Expand Down Expand Up @@ -571,6 +625,11 @@ class VoiceSelectionParams(proto.Message):
proto.STRING,
number=6,
)
multi_speaker_voice_config: "MultiSpeakerVoiceConfig" = proto.Field(
proto.MESSAGE,
number=7,
message="MultiSpeakerVoiceConfig",
)


class AudioConfig(proto.Message):
Expand Down Expand Up @@ -827,6 +886,11 @@ class StreamingSynthesisInput(proto.Message):
Markup for HD voices specifically. This field
may not be used with any other voices.

This field is a member of `oneof`_ ``input_source``.
multi_speaker_markup (google.cloud.texttospeech_v1.types.MultiSpeakerMarkup):
Multi-speaker markup for Gemini TTS. This
field may not be used with any other voices.

This field is a member of `oneof`_ ``input_source``.
prompt (str):
This is system instruction supported only for
Expand All @@ -845,6 +909,12 @@ class StreamingSynthesisInput(proto.Message):
number=5,
oneof="input_source",
)
multi_speaker_markup: "MultiSpeakerMarkup" = proto.Field(
proto.MESSAGE,
number=7,
oneof="input_source",
message="MultiSpeakerMarkup",
)
prompt: str = proto.Field(
proto.STRING,
number=6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.29.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-texttospeech",
"version": "2.29.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-texttospeech",
"version": "2.29.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Loading